allow infiinit sharing as space setting

This commit is contained in:
vabene1111
2023-02-12 18:16:43 +01:00
parent cb363d6321
commit 3c527fd112
3 changed files with 20 additions and 1 deletions

View File

@ -123,7 +123,7 @@ def share_link_valid(recipe, share):
return c
if link := ShareLink.objects.filter(recipe=recipe, uuid=share, abuse_blocked=False).first():
if 0 < settings.SHARING_LIMIT < link.request_count:
if 0 < settings.SHARING_LIMIT < link.request_count and not link.space.no_sharing_limit:
return False
link.request_count += 1
link.save()