Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Abi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Show more breadcrumbs
Lloyd Meins
AlekSIS-App-Abi
Commits
a1ef72b0
Commit
a1ef72b0
authored
3 years ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Automatically update model extensions
parent
76d6df8d
No related branches found
No related tags found
1 merge request
!1
Resolve "Implement models"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/abi/model_extensions.py
+4
-2
4 additions, 2 deletions
aleksis/apps/abi/model_extensions.py
with
4 additions
and
2 deletions
aleksis/apps/abi/model_extensions.py
+
4
−
2
View file @
a1ef72b0
...
@@ -3,8 +3,10 @@ from jsonstore import fields
...
@@ -3,8 +3,10 @@ from jsonstore import fields
from
.models
import
AdditionalProfileField
,
Profile
from
.models
import
AdditionalProfileField
,
Profile
def
update_profile_fields
():
def
update_profile_fields
():
for
obj
ect
in
AdditionalProfileField
.
objects
.
all
():
for
obj
in
AdditionalProfileField
.
objects
.
all
():
try
:
try
:
Profile
.
field
(
**
{
object
.
field_name
:
fields
.
CharField
(
max_length
=
255
,
verbose_name
=
object
.
name
)})
Profile
.
field
(
**
{
object
.
field_name
:
fields
.
CharField
(
max_length
=
255
,
verbose_name
=
object
.
name
)})
except
ValueError
:
except
ValueError
:
pass
pass
\ No newline at end of file
update_profile_fields
()
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