We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 516997d commit 1a1e5baCopy full SHA for 1a1e5ba
1 file changed
dojo/endpoint/utils.py
@@ -79,6 +79,8 @@ def endpoint_get_or_create(**kwargs):
79
count = qs.count()
80
if count == 0:
81
return Endpoint.objects.get_or_create(**kwargs)
82
+ elif count == 1:
83
+ return qs.order_by("id").first(), False
84
else:
85
logger.warning(
86
f"Endpoints in your database are broken. "
0 commit comments