diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2021-09-23 16:37:43 -0400 |
---|---|---|
committer | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2021-09-23 16:37:43 -0400 |
commit | 2ebb82b5f344de1e17abd70c51c4cce765761dd1 (patch) | |
tree | 2e00b80ae4022d98c58c4fbfbc72abdbc0e2912e | |
parent | a819fc1df86721eda36eee89d0235c89b3159d6b (diff) |
Fix collaborator field with recent changes
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Change-Id: Id305de9b1567adf103c47d5180b0b28ebfdf1b5e
-rw-r--r-- | docker-compose.override-dev.yml | 1 | ||||
-rw-r--r-- | src/booking/lib.py | 4 | ||||
-rw-r--r-- | src/booking/quick_deployer.py | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/docker-compose.override-dev.yml b/docker-compose.override-dev.yml index ee0b7a1..4d42569 100644 --- a/docker-compose.override-dev.yml +++ b/docker-compose.override-dev.yml @@ -20,7 +20,6 @@ services: dockerfile: web/Dockerfile command: > sh -c "cd static && npm install && cd .. && - ./manage.py migrate && ./manage.py runserver 0:8000" volumes: - ./src:/laas_dashboard diff --git a/src/booking/lib.py b/src/booking/lib.py index 7a4c261..8c87979 100644 --- a/src/booking/lib.py +++ b/src/booking/lib.py @@ -28,9 +28,9 @@ def get_user_items(exclude=None): for up in qs: item = { 'id': up.id, - 'expanded_name': up.full_name, + 'expanded_name': up.full_name if up.full_name else up.user.username, 'small_name': up.user.username, - 'string': up.email_addr + 'string': up.email_addr if up.email_addr else up.user.username, } items[up.id] = item return items diff --git a/src/booking/quick_deployer.py b/src/booking/quick_deployer.py index 9bdebc2..2ab18a6 100644 --- a/src/booking/quick_deployer.py +++ b/src/booking/quick_deployer.py @@ -268,7 +268,7 @@ def create_from_form(form, request): ) booking.pdf = PDFTemplater.makePDF(booking) - for collaborator in users_field: # list of UserProfiles + for collaborator in users_field: # list of Users (not UserProfile) booking.collaborators.add(collaborator.user) booking.save() |