From 2d75066884b2c415e85640f63c99826371879bba Mon Sep 17 00:00:00 2001 From: Prince Kurt Laurence Date: Wed, 24 Jan 2024 22:38:59 +0800 Subject: [PATCH] added a option on course --- .../__pycache__/0001_initial.cpython-311.pyc | Bin 3978 -> 3978 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 164 -> 164 bytes equipment_tracker/accounts/models.py | 1 + .../__pycache__/0001_initial.cpython-311.pyc | Bin 5484 -> 5484 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 166 -> 166 bytes equipment_tracker/equipments/models.py | 2 +- equipment_tracker/schema.yml | 26 +++++++++--------- 7 files changed, 15 insertions(+), 14 deletions(-) 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 945b698509c4f7130020085243156a082c0d6e10..1975fb433c0d03c7c83f7371ef80f9138b6866ab 100644 GIT binary patch delta 22 ccmeB@?~>>gS1fKu^ 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 c4c6e3cb626f5f7333e1f83a1116a30f92ad81ca..f0376dc6b1563ff46e14e0833614a91fb4a4f340 100644 GIT binary patch delta 20 acmaE(^+t<(IWI340}wEY%-qPGC<*{PlLX`d delta 20 acmaE(^+t<(IWI340}w>soW7AeQ4|0}hz0%t diff --git a/equipment_tracker/equipments/migrations/__pycache__/__init__.cpython-311.pyc b/equipment_tracker/equipments/migrations/__pycache__/__init__.cpython-311.pyc index 2c4bf8882464475278652d9c881a71c50d3c238c..b83f87dd5c19d5e022f6230ef82203aa14c051fe 100644 GIT binary patch delta 19 ZcmZ3+xQvl|IWI340}%XLQ#X-&HUKc21%Lnm delta 19 ZcmZ3+xQvl|IWI340}vEu=T79F4FD_L1f>7~ 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