Skip to content

Token value uniqueness check must also check nonmembertokens #285

Description

@rambo

Otherwise token export will fail.

Traceback (most recent call last):
  File "./manage.py", line 17, in <module>
    execute_from_command_line(sys.argv)
  File "/home/hacklab/asylum/project/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 351, in execute_from_command_line
    utility.execute()
  File "/home/hacklab/asylum/project/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 343, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/hacklab/asylum/project/venv/lib/python3.4/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/hacklab/asylum/project/venv/lib/python3.4/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/home/hacklab/asylum/project/access/management/commands/exporttokens.py", line 33, in handle
    self.cursor.execute("INSERT INTO valid_tokens VALUES (?,?,?,?);", (t.value, t.ttype.pk, acl['bits'], json.dumps(acl['externals'])))
sqlite3.IntegrityError: UNIQUE constraint failed: valid_tokens.value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions