Skip to content

Commit

Permalink
fix migration, admin display
Browse files Browse the repository at this point in the history
  • Loading branch information
khvn26 committed Jan 23, 2025
1 parent db1d362 commit 01fa3c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/features/feature_health/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class FeatureHealthProviderAdmin(admin.ModelAdmin):
list_display = (

Check warning on line 12 in api/features/feature_health/admin.py

View check run for this annotation

Codecov / codecov/patch

api/features/feature_health/admin.py#L10-L12

Added lines #L10 - L12 were not covered by tests
"project",
"type",
"name",
"created_by",
"webhook_url",
)
Expand Down
6 changes: 3 additions & 3 deletions api/features/feature_health/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ class FeatureHealthProvider(
created_by = models.ForeignKey("users.FFAdminUser", on_delete=models.CASCADE)

class Meta:
unique_together = ("type", "project")
unique_together = ("name", "project")

def get_create_log_message(
self,
history_instance: "FeatureHealthProvider",
) -> str | None:
return FEATURE_HEALTH_PROVIDER_CREATED_MESSAGE % (self.type, self.project.name)
return FEATURE_HEALTH_PROVIDER_CREATED_MESSAGE % (self.name, self.project.name)

Check warning on line 51 in api/features/feature_health/models.py

View check run for this annotation

Codecov / codecov/patch

api/features/feature_health/models.py#L51

Added line #L51 was not covered by tests

def get_delete_log_message(
self,
history_instance: "FeatureHealthProvider",
) -> str | None:
return FEATURE_HEALTH_PROVIDER_DELETED_MESSAGE % (self.type, self.project.name)
return FEATURE_HEALTH_PROVIDER_DELETED_MESSAGE % (self.name, self.project.name)

Check warning on line 57 in api/features/feature_health/models.py

View check run for this annotation

Codecov / codecov/patch

api/features/feature_health/models.py#L57

Added line #L57 was not covered by tests

def get_audit_log_author(
self,
Expand Down
2 changes: 1 addition & 1 deletion api/features/migrations/0066_add_feature_health_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class Migration(migrations.Migration):
),
],
options={
"unique_together": {("type", "project")},
"unique_together": {("name", "project")},
},
),
]

0 comments on commit 01fa3c7

Please sign in to comment.