Skip to content
Snippets Groups Projects
Commit 505193c1 authored by Lukas Schneider's avatar Lukas Schneider
Browse files

Add to_dict method to UserIdentifierTypes

parent c043c5f2
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,10 @@ class UserIdentifierTypes(IntEnum): ...@@ -39,6 +39,10 @@ class UserIdentifierTypes(IntEnum):
BARCODE = 2 BARCODE = 2
RFID = 3 RFID = 3
@staticmethod
def to_dict():
return {tag.name: tag.value for tag in UserIdentifierTypes}
class UserIdentifier(models.Model): class UserIdentifier(models.Model):
user = models.ForeignKey('user', on_delete=models.CASCADE, null=False) user = models.ForeignKey('user', on_delete=models.CASCADE, null=False)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment