fix: 优化safe_get_or_create以处理并发4
This commit is contained in:
parent
f6fe704f65
commit
1072621301
|
@ -127,7 +127,6 @@ class BaseModel(models.Model):
|
||||||
try:
|
try:
|
||||||
return cls.objects.get(**kwargs), False
|
return cls.objects.get(**kwargs), False
|
||||||
except cls.DoesNotExist:
|
except cls.DoesNotExist:
|
||||||
pass
|
|
||||||
raise
|
raise
|
||||||
|
|
||||||
def handle_parent(self):
|
def handle_parent(self):
|
||||||
|
|
Loading…
Reference in New Issue