Skip to content

Commit

Permalink
chore(surveys): Update model query name for survey (#17387)
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkakkar authored Sep 12, 2023
1 parent 63d6dbc commit bb417f1
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion latest_migrations.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name
ee: 0015_add_verified_properties
otp_static: 0002_throttling
otp_totp: 0002_auto_20190420_0723
posthog: 0348_alter_datawarehousetable_format
posthog: 0349_update_survey_query_name
sessions: 0001_initial
social_django: 0010_uid_db_index
two_factor: 0007_auto_20201201_1019
38 changes: 38 additions & 0 deletions posthog/migrations/0349_update_survey_query_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Generated by Django 3.2.19 on 2023-09-12 10:35

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
("posthog", "0348_alter_datawarehousetable_format"),
]

operations = [
migrations.AlterField(
model_name="survey",
name="linked_flag",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="surveys_linked_flag",
related_query_name="survey_linked_flag",
to="posthog.featureflag",
),
),
migrations.AlterField(
model_name="survey",
name="targeting_flag",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="surveys_targeting_flag",
related_query_name="survey_targeting_flag",
to="posthog.featureflag",
),
),
]
4 changes: 2 additions & 2 deletions posthog/models/feedback/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class Meta:
blank=True,
on_delete=models.SET_NULL,
related_name="surveys_linked_flag",
related_query_name="survey",
related_query_name="survey_linked_flag",
)
targeting_flag: models.ForeignKey = models.ForeignKey(
"posthog.FeatureFlag",
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name="surveys_targeting_flag",
related_query_name="survey",
related_query_name="survey_targeting_flag",
)
type: models.CharField = models.CharField(max_length=40, choices=SurveyType.choices)

Expand Down

0 comments on commit bb417f1

Please sign in to comment.