incoming Create flow with tests

This commit is contained in:
Mouse Reeve
2021-02-15 19:41:22 -08:00
parent 81e2021f92
commit 12a3aa9667
6 changed files with 129 additions and 186 deletions

View File

@ -44,9 +44,7 @@ def naive_parse(activity_objects, activity_json):
''' this navigates circular import issues '''
try:
activity_type = activity_json['type']
print(activity_type)
serializer = activity_objects[activity_type]
print(serializer)
except KeyError as e:
raise ActivitySerializerError(e)
@ -64,7 +62,6 @@ class ActivityObject:
has a default value '''
for field in fields(self):
try:
print(field.name, field.type)
value = kwargs[field.name]
try:
is_subclass = issubclass(field.type, ActivityObject)

View File

@ -23,7 +23,6 @@ class Create(Verb):
def action(self):
''' create the model instance from the dataclass '''
# check for dupes
self.object.to_model()