Skip to content
Snippets Groups Projects
Commit eecab980 authored by Bodor Máté's avatar Bodor Máté
Browse files

update dependenis and fix flake8 error

parent 593774b2
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ class SolutionSerializer(serializers.ModelSerializer): ...@@ -64,7 +64,7 @@ class SolutionSerializer(serializers.ModelSerializer):
return value return value
def update(self, instance, validated_data): def update(self, instance, validated_data):
if instance.corrected == False and validated_data.get('corrected', instance.corrected) == True: if instance.corrected is not True and validated_data.get('corrected', instance.corrected) is True:
email.homework_corrected( email.homework_corrected(
instance.created_by.user, instance.created_by.user,
instance.task.title, instance.task.title,
...@@ -76,4 +76,3 @@ class SolutionSerializer(serializers.ModelSerializer): ...@@ -76,4 +76,3 @@ class SolutionSerializer(serializers.ModelSerializer):
profile = CurrentUserMiddleware.get_current_user_profile() profile = CurrentUserMiddleware.get_current_user_profile()
models.Solution.objects.filter(created_by=profile, task=validated_data['task']).delete() models.Solution.objects.filter(created_by=profile, task=validated_data['task']).delete()
return super().create(validated_data) return super().create(validated_data)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment