mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-02-02 20:59:06 +08:00
enforce allow_dashes_in_svc at module creation
This commit is contained in:
@@ -710,6 +710,15 @@ def submit_module_build(db_session, username, stream_or_packager, params, module
|
||||
module.context = mmd.get_context()
|
||||
|
||||
module.context += context_suffix
|
||||
|
||||
if not conf.allow_dashes_in_svc:
|
||||
if '-' in module.stream:
|
||||
raise ValidationError('Dashes not allowed in stream')
|
||||
if '-' in module.version:
|
||||
raise ValidationError('Dashes not allowed in version')
|
||||
if '-' in module.context:
|
||||
raise ValidationError('Dashes not allowed in context')
|
||||
|
||||
db_session.commit()
|
||||
|
||||
notify_on_module_state_change(
|
||||
|
||||
Reference in New Issue
Block a user