Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Odevzdávací Systém MO
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MO-P
Odevzdávací Systém MO
Commits
42d3036d
Project 'mj/mo-submit' was moved to 'mo-p/osmo'. Please update any links and bookmarks that may still have the old path.
Commit
42d3036d
authored
Jan 21, 2021
by
Jiří Setnička
Browse files
Options
Downloads
Patches
Plain Diff
DB: Přidání vztahu ve směru users->participants
parent
92c8da38
Branches
Branches containing commit
No related tags found
1 merge request
!20
Vylepšené vyhledávání
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mo/db.py
+1
-0
1 addition, 0 deletions
mo/db.py
with
1 addition
and
0 deletions
mo/db.py
+
1
−
0
View file @
42d3036d
...
...
@@ -240,6 +240,7 @@ class User(Base):
note
=
Column
(
Text
,
nullable
=
False
,
server_default
=
text
(
"''
::text
"
))
roles
=
relationship
(
'
UserRole
'
,
primaryjoin
=
'
UserRole.user_id == User.user_id
'
)
participants
=
relationship
(
'
Participant
'
,
primaryjoin
=
'
Participant.user_id == User.user_id
'
)
def
full_name
(
self
)
->
str
:
return
self
.
first_name
+
'
'
+
self
.
last_name
...
...
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
sign in
to comment