Merge pull request #2818 from emanuelschuetze/motion-identifier-without-blanks
Add new personal settings MOTION_IDENTIFIER_WITHOUT_BLANKS.
This commit is contained in:
commit
1a88f0985a
@ -54,6 +54,7 @@ Motions:
|
||||
- Changed label of former state "commited a bill" to "refered to committee".
|
||||
- New csv import layout and using Papa Parse for parsing the csv.
|
||||
- Number of ballots printed can now be set in config.
|
||||
- Add new personal settings to remove all whitespaces from motion identifier.
|
||||
|
||||
Elections:
|
||||
- Added options to calculate percentages on different bases.
|
||||
|
@ -336,6 +336,10 @@ class Motion(RESTModelMixin, models.Model):
|
||||
number += 1
|
||||
identifier = '%s%s' % (prefix, self.extend_identifier_number(number))
|
||||
|
||||
# remove all whitespaces from identifier if MOTION_IDENTIFIER_WITHOUT_BLANKS is set
|
||||
if hasattr(settings, 'MOTION_IDENTIFIER_WITHOUT_BLANKS') and settings.MOTION_IDENTIFIER_WITHOUT_BLANKS:
|
||||
identifier = identifier.replace(' ', '')
|
||||
|
||||
self.identifier = identifier
|
||||
self.identifier_number = number
|
||||
|
||||
|
@ -120,3 +120,4 @@ SEARCH_INDEX = os.path.join(OPENSLIDES_USER_DATA_PATH, 'search_index')
|
||||
# Customization of OpenSlides apps
|
||||
|
||||
MOTION_IDENTIFIER_MIN_DIGITS = 1
|
||||
MOTION_IDENTIFIER_WITHOUT_BLANKS = False
|
||||
|
Loading…
Reference in New Issue
Block a user