Skip to content

Commit

Permalink
chore(api): bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
peterthomassen committed Aug 11, 2022
1 parent 73b5061 commit 6658f15
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions api/desecapi/authentication.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import base64
from datetime import datetime, timezone
import datetime
from ipaddress import ip_address

from django.contrib.auth.hashers import PBKDF2PasswordHasher
Expand Down Expand Up @@ -161,7 +161,7 @@ def authenticate_credentials(self, context):
serializer.is_valid(raise_exception=True)
user = serializer.validated_data['user']

email_verified = datetime.fromtimestamp(serializer.timestamp, timezone.utc)
email_verified = datetime.datetime.fromtimestamp(serializer.timestamp, datetime.timezone.utc)
user.email_verified = max(user.email_verified or email_verified, email_verified)
user.save()

Expand Down
2 changes: 1 addition & 1 deletion api/desecapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def delete(self):
when=pgtrigger.Before,
condition=pgtrigger.Q(old__domain__isnull=True, new__domain__isnull=False),
),
# Ideally, this would be a deferred trigger, but depends on https://github.com/Opus10/django-pgtrigger/issues/14
# Ideally, a deferred trigger (https://github.com/Opus10/django-pgtrigger/issues/14). Available in 3.4.0.
pgtrigger.Trigger(
name='default_policy_on_delete',
operation=pgtrigger.Delete,
Expand Down
2 changes: 1 addition & 1 deletion api/desecapi/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def validate(self, attrs):

def exists(self, arg):
if isinstance(arg, models.RRset):
return arg.records.exists()
return arg.records.exists() if arg.pk else False
else:
return bool(arg.get('records')) if 'records' in arg.keys() else True

Expand Down
6 changes: 3 additions & 3 deletions api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ captcha~=0.4.0
celery~=5.2.1
coverage~=6.2
cryptography~=37.0.4
Django~=4.0.3
django-cors-headers~=3.10.1
Django~=4.1.0
django-cors-headers~=3.13.0
djangorestframework~=3.13.1
django-celery-email~=3.0.0
django-netfields~=1.3.0
django-pgtrigger~=2.4.0
django-pgtrigger~=2.5.1 # Upgrade to 3.x on occasion. Trigger management syntax has changed considerably.
django-prometheus~=2.2.0
dnspython~=2.2.0
httpretty~=1.0.5
Expand Down

0 comments on commit 6658f15

Please sign in to comment.