Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Terraform modules
Monitor
Service Desk
Analyze
Contributor 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
AlekSIS®
Official
AlekSIS-Core
Commits
fd1bb8fb
Verified
Commit
fd1bb8fb
authored
3 years ago
by
Tom Teichler
Browse files
Options
Downloads
Patches
Plain Diff
Remove null=True from not unique CharFields
parent
72fd701c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!823
Resolve "Place of birth is None if unset"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/core/migrations/0028_char_field_not_null.py
+25
-0
25 additions, 0 deletions
aleksis/core/migrations/0028_char_field_not_null.py
aleksis/core/models.py
+2
-4
2 additions, 4 deletions
aleksis/core/models.py
with
27 additions
and
4 deletions
aleksis/core/migrations/0028_char_field_not_null.py
0 → 100644
+
25
−
0
View file @
fd1bb8fb
# Generated by Django 3.2.10 on 2021-12-15 21:10
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
core
'
,
'
0027_person_place_of_birth
'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'
oauthapplication
'
,
name
=
'
authorization_grant_type
'
,
field
=
models
.
CharField
(
blank
=
True
,
choices
=
[(
'
authorization-code
'
,
'
Authorization code
'
),
(
'
implicit
'
,
'
Implicit
'
),
(
'
password
'
,
'
Resource owner password-based
'
),
(
'
client-credentials
'
,
'
Client credentials
'
),
(
'
openid-hybrid
'
,
'
OpenID connect hybrid
'
)],
default
=
''
,
max_length
=
32
),
preserve_default
=
False
,
),
migrations
.
AlterField
(
model_name
=
'
person
'
,
name
=
'
place_of_birth
'
,
field
=
models
.
CharField
(
blank
=
True
,
default
=
''
,
max_length
=
255
,
verbose_name
=
'
Place of birth
'
),
preserve_default
=
False
,
),
]
This diff is collapsed.
Click to expand it.
aleksis/core/models.py
+
2
−
4
View file @
fd1bb8fb
...
...
@@ -194,9 +194,7 @@ class Person(ExtensibleModel):
email
=
models
.
EmailField
(
verbose_name
=
_
(
"
E-mail address
"
),
blank
=
True
)
date_of_birth
=
models
.
DateField
(
verbose_name
=
_
(
"
Date of birth
"
),
blank
=
True
,
null
=
True
)
place_of_birth
=
models
.
CharField
(
verbose_name
=
_
(
"
Place of birth
"
),
max_length
=
255
,
blank
=
True
,
null
=
True
)
place_of_birth
=
models
.
CharField
(
verbose_name
=
_
(
"
Place of birth
"
),
max_length
=
255
,
blank
=
True
)
sex
=
models
.
CharField
(
verbose_name
=
_
(
"
Sex
"
),
max_length
=
1
,
choices
=
SEX_CHOICES
,
blank
=
True
)
photo
=
models
.
ImageField
(
verbose_name
=
_
(
"
Photo
"
),
blank
=
True
,
null
=
True
)
...
...
@@ -1118,7 +1116,7 @@ class OAuthApplication(AbstractApplication):
# Override grant types to make field optional
authorization_grant_type
=
models
.
CharField
(
max_length
=
32
,
choices
=
AbstractApplication
.
GRANT_TYPES
,
blank
=
True
,
null
=
True
max_length
=
32
,
choices
=
AbstractApplication
.
GRANT_TYPES
,
blank
=
True
)
# Optional list of alloewd scopes
...
...
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