Skip to content

Commit

Permalink
Drop obsolete ProjectInsightsSnapshot (#3533)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli authored Jan 17, 2025
1 parent 89f390a commit 638ae4f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
17 changes: 0 additions & 17 deletions pontoon/insights/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from pontoon.insights.models import (
LocaleInsightsSnapshot,
ProjectInsightsSnapshot,
ProjectLocaleInsightsSnapshot,
)

Expand All @@ -22,21 +21,6 @@ class LocaleInsightsSnapshotAdmin(admin.ModelAdmin):
)


class ProjectInsightsSnapshotAdmin(admin.ModelAdmin):
search_fields = [
"pk",
"project__slug",
"project__name",
]
list_display = (
"pk",
"project",
"created_at",
"completion",
"unreviewed_strings",
)


class ProjectLocaleInsightsSnapshotAdmin(admin.ModelAdmin):
search_fields = [
"pk",
Expand All @@ -56,5 +40,4 @@ class ProjectLocaleInsightsSnapshotAdmin(admin.ModelAdmin):


admin.site.register(LocaleInsightsSnapshot, LocaleInsightsSnapshotAdmin)
admin.site.register(ProjectInsightsSnapshot, ProjectInsightsSnapshotAdmin)
admin.site.register(ProjectLocaleInsightsSnapshot, ProjectLocaleInsightsSnapshotAdmin)
15 changes: 15 additions & 0 deletions pontoon/insights/migrations/0016_delete_projectinsightssnapshot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Generated by Django 4.2.17 on 2025-01-17 14:50

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("insights", "0015_fix_projectlocale_insights_data"),
]

operations = [
migrations.DeleteModel(
name="ProjectInsightsSnapshot",
),
]
4 changes: 0 additions & 4 deletions pontoon/insights/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,5 @@ class LocaleInsightsSnapshot(InsightsSnapshot):
locale = models.ForeignKey("base.Locale", models.CASCADE)


class ProjectInsightsSnapshot(InsightsSnapshot):
project = models.ForeignKey("base.Project", models.CASCADE)


class ProjectLocaleInsightsSnapshot(InsightsSnapshot):
project_locale = models.ForeignKey("base.ProjectLocale", models.CASCADE)

0 comments on commit 638ae4f

Please sign in to comment.