fix --> org addresses org.id bug
This commit is contained in:
@@ -296,7 +296,7 @@ class OrganizationViewSet(BaseViewSet, ModelViewSet, DynamicSearchMixin):
|
||||
|
||||
address_obj_list = []
|
||||
for addr in request.data['addresses']:
|
||||
addr.update({'org': organization.id})
|
||||
addr.update({'org': organization})
|
||||
address_obj_list.append(
|
||||
OrganizationLocationInfo(**addr)
|
||||
)
|
||||
@@ -343,7 +343,7 @@ class OrganizationViewSet(BaseViewSet, ModelViewSet, DynamicSearchMixin):
|
||||
# create new locations
|
||||
address_obj_list = []
|
||||
for addr in request.data['addresses']:
|
||||
addr.update({'org': organization.id})
|
||||
addr.update({'org': organization})
|
||||
address_obj_list.append(
|
||||
OrganizationLocationInfo(**addr)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user