Fakultas Ilmu Komputer UI

Commit a81881ca authored by Irwanto's avatar Irwanto
Browse files

[REFACTOR] Change is_positive condition in case serializers

parent ce8b6f62
Pipeline #49472 passed with stages
in 2 minutes and 57 seconds
......@@ -93,7 +93,7 @@ class InvestigationCaseSerializer(serializers.ModelSerializer):
outcome = self.validated_data.get('outcome', None)
is_positive = None
if outcome is not None:
is_positive = True if "+" in outcome else False
is_positive = False if "-" in outcome else True
super(InvestigationCaseSerializer, self).save(author=account, is_positive=is_positive)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment