Skip to content

Commit

Permalink
Merge pull request #135 from cerven12/UpdatingNestData
Browse files Browse the repository at this point in the history
update
  • Loading branch information
tsonobe1 authored Sep 5, 2020
2 parents 5a3e9f5 + 91a3fb4 commit 8ef53d9
Show file tree
Hide file tree
Showing 14 changed files with 2,215 additions and 576 deletions.
8 changes: 8 additions & 0 deletions apiv1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class SolutionSerializer(serializers.ModelSerializer):
class Meta:
model = Solution
fields = ['solution_id', 'solution', 'created_at', 'hurdle']
extra_kwargs = {
# This was key!
"hurdle":{"required": False}
}


class HurdleSerializer(WritableNestedModelSerializer):
Expand Down Expand Up @@ -145,6 +149,10 @@ class IdeaSerializer(serializers.ModelSerializer):
class Meta:
model = Idea
fields = ['idea_id', 'idea', 'created_at', 'worry']
extra_kwargs = {
# This was key!
"worry":{"required": False}
}


class WorrySerializer(WritableNestedModelSerializer):
Expand Down
Loading

0 comments on commit 8ef53d9

Please sign in to comment.