Skip to content

Commit

Permalink
Remove exception if Group is not found, update requirements for pytho…
Browse files Browse the repository at this point in the history
…n>3.9
  • Loading branch information
ivanmicetic committed Feb 13, 2025
1 parent 0315d6d commit b21e2c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drmaatic/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def anonymous(self):
return self.objects.get_or_create(name='anonymous', defaults={'throttling_rate_burst': '20/s',
'token_renewal_time': '3 days',
'cpu_credit_max_amount': 100})[0]
except OperationalError:
except:
return Group(name='anonymous', throttling_rate_burst='20/s', token_renewal_time='3 days',
cpu_credit_max_amount=100)

Expand All @@ -68,7 +68,7 @@ def registered(self):
return self.objects.get_or_create(name='registered', defaults={'throttling_rate_burst': '30/s',
'token_renewal_time': '5 days',
'cpu_credit_max_amount': 200})[0]
except OperationalError:
except:
return Group(name='registered', throttling_rate_burst='30/s', token_renewal_time='5 days',
cpu_credit_max_amount=200)

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ requests
mysqlclient
django-admin-rangefilter
setuptools
backports.zoneinfo
backports.zoneinfo; python_version < "3.9"
tzdata

0 comments on commit b21e2c6

Please sign in to comment.