corrects tests for latest code changes
This commit is contained in:
parent
20395ff2ec
commit
cfa4cb015d
8 changed files with 22 additions and 73 deletions
|
@ -76,11 +76,12 @@ class ActivityObject:
|
|||
if not isinstance(self, model.activity_serializer):
|
||||
raise TypeError('Wrong activity type for model')
|
||||
|
||||
# check for an existing instance
|
||||
try:
|
||||
return model.objects.get(remote_id=self.id)
|
||||
except model.DoesNotExist:
|
||||
pass
|
||||
# check for an existing instance, if we're not updating a known obj
|
||||
if not instance:
|
||||
try:
|
||||
return model.objects.get(remote_id=self.id)
|
||||
except model.DoesNotExist:
|
||||
pass
|
||||
|
||||
model_fields = [m.name for m in model._meta.get_fields()]
|
||||
mapped_fields = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue