Skip to content

Commit

Permalink
fix more pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernst committed Jul 4, 2024
1 parent eee9b8d commit 45b98d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions django_walletpass/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ class LogAdmin(admin.ModelAdmin):

def pass_(self, obj: Log):
if obj.pazz_id:
# pylint: disable=protected-access
url = reverse(
f"admin:{obj.pazz._meta.app_label}_{obj.pazz._meta.model_name}_change",
args=[obj.pazz_id],
)
# pylint: enable=protected-access
return format_html(
"<a href='{url}'>{title}</a>",
url=url,
Expand Down Expand Up @@ -91,10 +93,12 @@ class RegistrationAdmin(admin.ModelAdmin):

def pass_(self, obj: Registration):
if obj.pazz_id:
# pylint: disable=protected-access
url = reverse(
f"admin:{obj.pazz._meta.app_label}_{obj.pazz._meta.model_name}_change",
args=[obj.pazz_id],
)
# pylint: enable=protected-access
return format_html(
"<a href='{url}'>{title}</a>",
url=url,
Expand Down

0 comments on commit 45b98d2

Please sign in to comment.