fix: Org is None not has id attribute

pull/13084/head
Bai 2024-04-19 07:32:42 +08:00 committed by Bryan
parent 660572a0ea
commit 64125051df
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ class OrgResourceStatisticsRefreshUtil:
if not cache_field_name:
return
org = getattr(instance, 'org', None)
if not org:
return
cache_field_name = tuple(cache_field_name)
cls.refresh_org_fields.delay(org_fields=((org, cache_field_name),))