Skip to content

Commit

Permalink
Fix Black formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmusselsmark committed Oct 27, 2024
1 parent e67018f commit 3669f82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion members/admin/activity_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def delete_queryset(self, request, queryset):
def delete_model(self, request, activity):
try:
activity.delete()
messages.success(request, f"Aktivitet \"{activity.name}\" slettet.")
messages.success(request, f'Aktivitet "{activity.name}" slettet.')
except ValidationError as e:
messages.error(request, e.message)

Expand Down
4 changes: 2 additions & 2 deletions members/models/activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def clean(self):
raise ValidationError(errors)

def delete(self, *args, **kwargs):
if (self.invitations() > 0 or self.participants() > 0):
if self.invitations() > 0 or self.participants() > 0:
raise ValidationError(
f"Aktivitet \"{self.name}\" kan ikke slettes, da der er tilmeldte eller inviterede personer."
f'Aktivitet "{self.name}" kan ikke slettes, da der er tilmeldte eller inviterede personer.'
)
super().delete(*args, **kwargs)

0 comments on commit 3669f82

Please sign in to comment.