diff --git a/equipment_tracker/accounts/migrations/__pycache__/0001_initial.cpython-311.pyc b/equipment_tracker/accounts/migrations/__pycache__/0001_initial.cpython-311.pyc index 945b698..1975fb4 100644 Binary files a/equipment_tracker/accounts/migrations/__pycache__/0001_initial.cpython-311.pyc and b/equipment_tracker/accounts/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/equipment_tracker/accounts/migrations/__pycache__/__init__.cpython-311.pyc b/equipment_tracker/accounts/migrations/__pycache__/__init__.cpython-311.pyc index 5a70566..17377aa 100644 Binary files a/equipment_tracker/accounts/migrations/__pycache__/__init__.cpython-311.pyc and b/equipment_tracker/accounts/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/equipment_tracker/accounts/models.py b/equipment_tracker/accounts/models.py index 113c6e7..3013e18 100644 --- a/equipment_tracker/accounts/models.py +++ b/equipment_tracker/accounts/models.py @@ -22,6 +22,7 @@ class CustomUser(AbstractUser): ('BS Food Technology', 'BS Food Technology'), ('BS Applied Physics', 'BS Applied Physics'), ('BS Environmental Science', 'BS Environmental Science'), + ('Not Applicable', 'Not Applicable'), ) course = models.CharField( diff --git a/equipment_tracker/equipments/migrations/__pycache__/0001_initial.cpython-311.pyc b/equipment_tracker/equipments/migrations/__pycache__/0001_initial.cpython-311.pyc index c4c6e3c..f0376dc 100644 Binary files a/equipment_tracker/equipments/migrations/__pycache__/0001_initial.cpython-311.pyc and b/equipment_tracker/equipments/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/equipment_tracker/equipments/migrations/__pycache__/__init__.cpython-311.pyc b/equipment_tracker/equipments/migrations/__pycache__/__init__.cpython-311.pyc index 2c4bf88..b83f87d 100644 Binary files a/equipment_tracker/equipments/migrations/__pycache__/__init__.cpython-311.pyc and b/equipment_tracker/equipments/migrations/__pycache__/__init__.cpython-311.pyc differ diff --git a/equipment_tracker/equipments/models.py b/equipment_tracker/equipments/models.py index dc14018..2ec1a18 100644 --- a/equipment_tracker/equipments/models.py +++ b/equipment_tracker/equipments/models.py @@ -54,7 +54,7 @@ class EquipmentInstance(models.Model): return super().save(*args, **kwargs) -seed_database = False +seed_database = True @receiver(post_migrate) diff --git a/equipment_tracker/schema.yml b/equipment_tracker/schema.yml index 84602d4..a57c826 100644 --- a/equipment_tracker/schema.yml +++ b/equipment_tracker/schema.yml @@ -1211,8 +1211,8 @@ components: email: type: string format: email + readOnly: true title: Email address - maxLength: 254 first_name: type: string maxLength: 100 @@ -1220,22 +1220,29 @@ components: nullable: true oneOf: - $ref: '#/components/schemas/CourseEnum' + - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' section: type: string nullable: true - maxLength: 60 last_name: type: string maxLength: 100 is_teacher: type: boolean + readOnly: true is_technician: type: boolean + readOnly: true required: + - course + - email - first_name - id + - is_teacher + - is_technician - last_name + - section - username Equipment: type: object @@ -1486,8 +1493,8 @@ components: email: type: string format: email + readOnly: true title: Email address - maxLength: 254 first_name: type: string maxLength: 100 @@ -1495,18 +1502,20 @@ components: nullable: true oneOf: - $ref: '#/components/schemas/CourseEnum' + - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' section: type: string nullable: true - maxLength: 60 last_name: type: string maxLength: 100 is_teacher: type: boolean + readOnly: true is_technician: type: boolean + readOnly: true PatchedEquipment: type: object properties: @@ -1589,8 +1598,6 @@ components: type: string format: date-time readOnly: true - section: - type: string SendEmailReset: type: object properties: @@ -1707,13 +1714,10 @@ components: type: string format: date-time readOnly: true - section: - type: string required: - borrower - equipments - id - - section - subject - teacher - timestamp @@ -1743,10 +1747,6 @@ components: properties: username: type: string - description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_ - only. - pattern: ^[\w.@+-]+$ - maxLength: 150 email: type: string format: email