Skip to content

Commit

Permalink
Use AddConstraintNotValid
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Apr 23, 2024
1 parent 8c5ba23 commit 549b311
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions mypy-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ posthog/session_recordings/queries/session_recording_list_from_replay_summary.py
posthog/session_recordings/queries/session_recording_list_from_replay_summary.py:0: note: If the method is meant to be abstract, use @abc.abstractmethod
posthog/session_recordings/queries/session_recording_list_from_replay_summary.py:0: error: Missing return statement [empty-body]
posthog/session_recordings/queries/session_recording_list_from_replay_summary.py:0: note: If the method is meant to be abstract, use @abc.abstractmethod
posthog/migrations/0404_remove_propertydefinition_property_type_is_valid_and_more.py:0: error: Module "django.contrib.postgres.operations" has no attribute "AddConstraintNotValid" [attr-defined]
posthog/hogql_queries/test/test_query_runner.py:0: error: Variable "TestQueryRunner" is not valid as a type [valid-type]
posthog/hogql_queries/test/test_query_runner.py:0: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
posthog/hogql_queries/test/test_query_runner.py:0: error: Invalid base class "TestQueryRunner" [misc]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated by Django 4.2.11 on 2024-04-21 21:11

from django.contrib.postgres.operations import AddConstraintNotValid
from django.db import migrations, models


Expand Down Expand Up @@ -36,7 +36,7 @@ class Migration(migrations.Migration):
choices=[(1, "event"), (2, "person"), (3, "group"), (4, "session")], default=1
),
),
migrations.AddConstraint(
AddConstraintNotValid(
model_name="propertydefinition",
constraint=models.CheckConstraint(
check=models.Q(("property_type__in", ["DateTime", "String", "Numeric", "Boolean", "Duration"])),
Expand Down

0 comments on commit 549b311

Please sign in to comment.