Skip to content

Commit

Permalink
Fix flake8 lints
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikhorluck committed Oct 16, 2023
1 parent 7159a9d commit 8ccaa99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/marks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _get_with_duration_and_vacation(added_date=timezone.now()):
if added_date < mark_change_date:
duration = 30

if type(added_date) == datetime:
if isinstance(added_date, datetime):
added_date = added_date.date()

# Add the duration
Expand Down
4 changes: 2 additions & 2 deletions apps/sso/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def to_representation(self, value):
return value.split()

def to_internal_value(self, data):
if type(data) == list:
if isinstance(data, list):
return " ".join(data)
elif type(data) == str:
elif isinstance(data, str):
return data.replace("\r\n", " ")
else:
raise ValidationError("Incorrect format")
Expand Down

0 comments on commit 8ccaa99

Please sign in to comment.