Skip to content

Commit

Permalink
Merge pull request #616 from camptocamp/fix-dispatch
Browse files Browse the repository at this point in the history
Dispatch event: Fix
  • Loading branch information
sbrunner authored Nov 19, 2024
2 parents 879a308 + 43f0798 commit c88009f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions github_app_geo_project/module/dispatch_publishing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class _Destination(BaseModel):
"""The event type to dispatch"""
legacy: bool = False
"""Transform the content to the legacy format"""
version_type: str
version_type: str | None = None
"""The version type to dispatch"""
package_type: str
package_type: str | None = None
"""The package type to dispatch"""
image_re: str = ".*"
"""The image regular expression to dispatch"""
Expand All @@ -37,7 +37,11 @@ class _Config(BaseModel):
"""The destinations to dispatch to"""


CONFIG = _Config(**json.loads(os.environ.get("DISPATCH_PUBLISH_CONFIG", "{}")))
try:
CONFIG = _Config(**json.loads(os.environ.get("DISPATCH_PUBLISH_CONFIG", "{}")))
except Exception: # pylint: disable=broad-exception-caught
_LOGGER.exception("Error loading the configuration")
CONFIG = _Config()


class DispatchPublishing(module.Module[None, None, None]):
Expand Down

0 comments on commit c88009f

Please sign in to comment.