fix: save for later API ratelimit issue (#29650)

This commit is contained in:
Waheed Ahmed
2021-12-21 14:05:55 +05:00
committed by GitHub
parent b33996d24e
commit c696469734
2 changed files with 14 additions and 1 deletions

View File

@@ -28,3 +28,16 @@ def request_post_email(group, request) -> str: # pylint: disable=unused-argumen
email = str(uuid4())
return email
def request_data_email(group, request) -> str: # pylint: disable=unused-argument
"""
Return the the email data param if it exists, otherwise return a
random id.
"""
email = request.data.get('email')
if not email:
email = str(uuid4())
return email