Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Jul 27, 2024
1 parent 2878fd7 commit d1780a2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions api/audit/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,12 @@ def call_webhooks(sender, instance, **kwargs):
def _get_integration_config(
instance: AuditLog, integration_name: str
) -> IntegrationsModel | None:
match True:
case hasattr(instance.organisation as organisation, integration_name):
return getattr(organisation, integration_name)
case hasattr(instance.project as project, integration_name):
return getattr(project, integration_name)
case hasattr(instance.environment as environment, integration_name):
return getattr(environment, integration_name)
if hasattr(organisation := instance.organisation, integration_name):
return getattr(organisation, integration_name)

Check warning on line 49 in api/audit/signals.py

View check run for this annotation

Codecov / codecov/patch

api/audit/signals.py#L49

Added line #L49 was not covered by tests
if hasattr(project := instance.project, integration_name):
return getattr(project, integration_name)
if hasattr(environment := instance.environment, integration_name):
return getattr(environment, integration_name)

Check warning on line 53 in api/audit/signals.py

View check run for this annotation

Codecov / codecov/patch

api/audit/signals.py#L53

Added line #L53 was not covered by tests
return None


Expand Down

0 comments on commit d1780a2

Please sign in to comment.