fix --> org addresses org.id bug

This commit is contained in:
2026-02-09 08:58:06 +03:30
parent 8449e2ef1b
commit 3b6deb0356

View File

@@ -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)
)