Skip to content

Commit

Permalink
fix: add router_basename for models with compound words
Browse files Browse the repository at this point in the history
It helps to reverse the url to access the resource

AAP-25487:Role user assignment response missing content_object except for Activations
  • Loading branch information
bzwei committed Jun 21, 2024
1 parent 79413ee commit c5351eb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/aap_eda/core/models/credential_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@


class CredentialType(BaseOrgModel, UniqueNamedModel):
router_basename = "credentialtype"

class Meta:
db_table = "core_credential_type"
constraints = [
Expand Down
2 changes: 2 additions & 0 deletions src/aap_eda/core/models/decision_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@


class DecisionEnvironment(BaseOrgModel, UniqueNamedModel):
router_basename = "decisionenvironment"

class Meta:
db_table = "core_decision_environment"
constraints = [
Expand Down
2 changes: 2 additions & 0 deletions src/aap_eda/core/models/eda_credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@


class EdaCredential(BaseOrgModel, UniqueNamedModel):
router_basename = "edacredential"

class Meta:
db_table = "core_eda_credential"
constraints = [
Expand Down
2 changes: 2 additions & 0 deletions src/aap_eda/core/models/event_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class EventStream(
):
"""Model representing an event stream."""

router_basename = "eventstream"

description = models.TextField(default="", blank=True)
is_enabled = models.BooleanField(default=True)
decision_environment = models.ForeignKey(
Expand Down
2 changes: 2 additions & 0 deletions src/aap_eda/core/models/rulebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ class Meta:


class AuditRule(BaseOrgModel):
router_basename = "auditrule"

class Meta:
db_table = "core_audit_rule"
indexes = [
Expand Down

0 comments on commit c5351eb

Please sign in to comment.