Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
greg
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
it-bott-integrasjoner
greg
Commits
98556998
Commit
98556998
authored
3 years ago
by
Tore.Brede
Browse files
Options
Downloads
Patches
Plain Diff
GREG-85: Fixing prolem with updating values
parent
d9f3545a
No related branches found
No related tags found
1 merge request
!113
GREG-85: Guest registration page
Pipeline
#97324
failed
3 years ago
Stage: venv update
Stage: tests and linting
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gregui/api/serializers/guest.py
+7
-11
7 additions, 11 deletions
gregui/api/serializers/guest.py
with
7 additions
and
11 deletions
gregui/api/serializers/guest.py
+
7
−
11
View file @
98556998
...
...
@@ -38,15 +38,9 @@ class GuestRegisterSerializer(serializers.ModelSerializer):
value
=
email
,
)
else
:
# Only expecting one private e-mail
private_email
=
Identity
.
objects
.
get
(
person_id
=
instance
.
id
,
type
=
Identity
.
IdentityType
.
PRIVATE_EMAIL
)
private_email
=
instance
.
private_email
private_email
.
value
=
email
private_email
.
save
()
# TODO Figure out why the following did not work
# instance.private_email.value = email
# instance.private_email.save()
if
not
instance
.
private_mobile
:
Identity
.
objects
.
create
(
...
...
@@ -55,8 +49,9 @@ class GuestRegisterSerializer(serializers.ModelSerializer):
value
=
mobile_phone
,
)
else
:
instance
.
private_mobile
.
value
=
mobile_phone
instance
.
private_mobile
.
save
()
private_mobile
=
instance
.
private_mobile
private_mobile
.
value
=
mobile_phone
private_mobile
.
save
()
if
"
fnr
"
in
validated_data
:
fnr
=
validated_data
.
pop
(
"
fnr
"
)
...
...
@@ -67,8 +62,9 @@ class GuestRegisterSerializer(serializers.ModelSerializer):
value
=
fnr
,
)
else
:
instance
.
fnr
.
value
=
fnr
instance
.
fnr
.
value
.
save
()
fnr_existing
=
instance
.
fnr
fnr_existing
.
value
=
fnr
fnr_existing
.
save
()
# TODO: we only want to allow changing the name if we don't have one
# from a reliable source (Feide/KORR)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment