diff --git a/frontend/coprs_frontend/coprs/logic/coprs_logic.py b/frontend/coprs_frontend/coprs/logic/coprs_logic.py index 9f5494cf6..67e0198f0 100644 --- a/frontend/coprs_frontend/coprs/logic/coprs_logic.py +++ b/frontend/coprs_frontend/coprs/logic/coprs_logic.py @@ -664,7 +664,7 @@ def _valid_custom_dir_suffix(copr, dirname): return all([c.isnumeric() for c in parts[2]]) @classmethod - def get_or_create(cls, copr, dirname, trusted_caller=False): + def get_or_create(cls, copr, dirname): """ Create a CoprDir on-demand, e.g. before pull-request builds is submitted. We don't create the "main" CoprDirs here (those are created @@ -680,7 +680,7 @@ def get_or_create(cls, copr, dirname, trusted_caller=False): copr.name, )) - if not trusted_caller and not cls._valid_custom_dir_suffix(copr, dirname): + if not cls._valid_custom_dir_suffix(copr, dirname): raise exceptions.BadRequest( f"Please use directory format {copr.name}:custom: " f"or {copr.name}:pr: (for automatically removed directories)" diff --git a/frontend/coprs_frontend/pagure_events.py b/frontend/coprs_frontend/pagure_events.py index c90a08b27..0ca2d2c9d 100755 --- a/frontend/coprs_frontend/pagure_events.py +++ b/frontend/coprs_frontend/pagure_events.py @@ -279,8 +279,7 @@ def the_call(self, message): if event_info.object_type == 'pull-request': dirname = pkg.copr.name + ':pr:' + str(event_info.object_id) - copr_dir = CoprDirsLogic.get_or_create(pkg.copr, dirname, - trusted_caller=True) + copr_dir = CoprDirsLogic.get_or_create(pkg.copr, dirname) update_callback = 'pagure_flag_pull_request' scm_object_url = os.path.join(base_url, event_info.project_url_path, 'c', str(event_info.end_commit))