Skip to content

Commit

Permalink
Disabled some pytest warning
Browse files Browse the repository at this point in the history
  • Loading branch information
srugano committed Nov 12, 2024
1 parent 7646bc2 commit a16d07a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ markers =
python_files=test_*.py
filterwarnings =
ignore::DeprecationWarning
ignore::django.utils.deprecation.RemovedInDjango51Warning
; ignore::django.utils.deprecation.RemovedInDjango51Warning
ignore::coverage.exceptions.CoverageWarning
4 changes: 3 additions & 1 deletion src/hope_country_report/apps/power_query/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class QueryAdmin(
change_form_template = None
ordering = ["-last_run"]
form = QueryForm
date_hierarchy = "datasets__last_run"

def get_queryset(self, request: HttpRequest) -> "QuerySet[AnyModel]":
return super().get_queryset(request).select_related("target", "owner")
Expand Down Expand Up @@ -464,7 +465,7 @@ class ReportConfigurationAdmin(
search_fields = ("name", "query__name")
ordering = ("-updated_on",)
change_form_template = "admin/power_query/report/change_form.html"

date_hierarchy = "last_run"
linked_objects_hide_empty = False
object: "ReportConfiguration"

Expand Down Expand Up @@ -542,6 +543,7 @@ class ReportDocumentAdmin(
list_filter = (("report", AutoCompleteFilter), "report__compress", "report__protect")
search_fields = ("title",)
filter_horizontal = ("limit_access_to",)
date_hierarchy = "dataset__last_run"
readonly_fields = ("arguments", "report", "dataset", "content_type", "formatter", "info", "size")

def get_queryset(self, request: HttpRequest) -> "QuerySet[ReportDocument]":
Expand Down

0 comments on commit a16d07a

Please sign in to comment.