lots of small fixes and todo removals

This commit is contained in:
Laura Klünder 2023-12-04 22:21:43 +01:00
parent 82aa079af0
commit 1a0c4e63f5
6 changed files with 4 additions and 9 deletions

View file

@ -159,11 +159,10 @@ class AccessPermissionForm(Form):
unique_key=unique_key)
def get_signed_data(self, key=None):
# todo: yep, we stil need to fix this
try:
api_secret = self.author.api_secrets.filter(scope_grant_permission=True).valid_only().get().api_secret
except Secret.DoesNotExist:
raise ValueError('Author has no feasable api secret.')
raise ValueError('Author has no feasible api secret.')
data = {
'id': self.data['access_restrictions'],
'time': int(time.time()),

View file

@ -21,7 +21,6 @@ def grant_access(request): # todo: make class based view
if form.is_valid():
token = form.get_token()
token.save()
# todo: this still needs fixing
if settings.DEBUG:
signed_data = form.get_signed_data()
print('/?'+urlencode({'access': signed_data}))