Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
protokollsystem
proto3
Commits
59cbe00a
Commit
59cbe00a
authored
Apr 14, 2017
by
Robin Sonnabend
Browse files
Limit length of etherpad urls
/close
#45
parent
12015614
Changes
1
Hide whitespace changes
Inline
Side-by-side
models/database.py
View file @
59cbe00a
...
...
@@ -244,7 +244,7 @@ class Protocol(DatabaseModel):
if
self
.
pad_identifier
is
None
:
identifier
=
self
.
get_identifier
()
if
self
.
protocoltype
.
non_reproducible_pad_links
:
identifier
=
"{}-{}"
.
format
(
identifier
,
str
(
uuid4
())
)
identifier
=
"{}-{}"
.
format
(
identifier
,
str
(
uuid4
())
.
replace
(
"-"
,
""
))[:
50
]
self
.
pad_identifier
=
identifier
db
.
session
.
commit
()
return
get_etherpad_url
(
self
.
pad_identifier
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment