mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-21 13:11:08 -05:00
series of tests added with built-in django test support
This commit is contained in:
@@ -10,8 +10,8 @@ def forwards_func(apps, schema_editor):
|
||||
ContentType = apps.get_model("contenttypes", "ContentType")
|
||||
db_alias = schema_editor.connection.alias
|
||||
|
||||
# Get content type for Park model
|
||||
park_content_type = ContentType.objects.db_manager(db_alias).get(
|
||||
# Get or create content type for Park model
|
||||
park_content_type, created = ContentType.objects.db_manager(db_alias).get_or_create(
|
||||
app_label='parks',
|
||||
model='park'
|
||||
)
|
||||
@@ -42,8 +42,8 @@ def reverse_func(apps, schema_editor):
|
||||
ContentType = apps.get_model("contenttypes", "ContentType")
|
||||
db_alias = schema_editor.connection.alias
|
||||
|
||||
# Get content type for Park model
|
||||
park_content_type = ContentType.objects.db_manager(db_alias).get(
|
||||
# Get or create content type for Park model
|
||||
park_content_type, created = ContentType.objects.db_manager(db_alias).get_or_create(
|
||||
app_label='parks',
|
||||
model='park'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user