Skip to content

Commit

Permalink
tweak fc admin
Browse files Browse the repository at this point in the history
  • Loading branch information
domdinicola committed Aug 25, 2024
1 parent 6a528fa commit 365f99f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 3 additions & 8 deletions backend/hct_mis_api/apps/erp_datahub/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@
from uuid import UUID

from django.db.models.query import QuerySet
from django.http import (
HttpRequest,
HttpResponsePermanentRedirect,
HttpResponseRedirect,
)
from django.http import HttpRequest, HttpResponsePermanentRedirect, HttpResponseRedirect


class NumberValidator(RegexValidator):
Expand Down Expand Up @@ -125,6 +121,7 @@ class FundsCommitmentAdmin(HOPEModelAdminBase):
)
date_hierarchy = "create_date"
form = FundsCommitmentAddForm
search_fields = ("rec_serial_number", "vendor_id", "wbs_element", "funds_commitment_number")

@atomic(using="cash_assist_datahub_erp")
@atomic(using="default")
Expand Down Expand Up @@ -162,9 +159,7 @@ def assign_business_office(
@button()
def execute_exchange_rate_sync(self, request: "HttpRequest") -> None:
if request.method == "POST":
from hct_mis_api.apps.erp_datahub.tasks.pull_from_erp_datahub import (
PullFromErpDatahubTask,
)
from hct_mis_api.apps.erp_datahub.tasks.pull_from_erp_datahub import PullFromErpDatahubTask

task = PullFromErpDatahubTask()
task.execute()
Expand Down
1 change: 1 addition & 0 deletions backend/hct_mis_api/apps/mis_datahub/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def household(self, button: button) -> Optional[str]:
@admin.register(FundsCommitment)
class FundsCommitmentAdmin(HUBAdminMixin):
filters = (BusinessAreaFilter,)
search_fields = ("rec_serial_number", "vendor_id", "wbs_element", "funds_commitment_number")


@admin.register(DownPayment)
Expand Down

0 comments on commit 365f99f

Please sign in to comment.