corrects tests for latest code changes
This commit is contained in:
@ -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 = {}
|
||||
|
Reference in New Issue
Block a user