fix: 优化safe_get_or_create以处理并发4

This commit is contained in:
caoqianming 2024-12-31 09:18:01 +08:00
parent f6fe704f65
commit 1072621301
1 changed files with 1 additions and 2 deletions

View File

@ -127,8 +127,7 @@ class BaseModel(models.Model):
try:
return cls.objects.get(**kwargs), False
except cls.DoesNotExist:
pass
raise
raise
def handle_parent(self):
pass