Skip to content

Commit

Permalink
Add new connection type: OPENING_HOUR_OBJECT
Browse files Browse the repository at this point in the history
  • Loading branch information
juuso-j committed Jul 21, 2023
1 parent 6d06f04 commit afe893a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
34 changes: 34 additions & 0 deletions services/migrations/0100_alter_unitconnection_section_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Generated by Django 4.1.7 on 2023-07-21 07:18

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("services", "0099_unitconnection_tags"),
]

operations = [
migrations.AlterField(
model_name="unitconnection",
name="section_type",
field=models.PositiveSmallIntegerField(
choices=[
(1, "PHONE_OR_EMAIL"),
(2, "LINK"),
(3, "TOPICAL"),
(4, "OTHER_INFO"),
(5, "OPENING_HOURS"),
(6, "SOCIAL_MEDIA_LINK"),
(7, "OTHER_ADDRESS"),
(8, "HIGHLIGHT"),
(9, "ESERVICE_LINK"),
(10, "PRICE"),
(11, "SUBGROUP"),
(12, "OPENING_HOUR_OBJECT"),
],
null=True,
),
),
]
3 changes: 3 additions & 0 deletions services/models/unit_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class UnitConnection(models.Model):
ESERVICE_LINK_TYPE = 9
PRICE_TYPE = 10
SUBGROUP_TYPE = 11
OPENING_HOUR_OBJECT = 12

SECTION_TYPES = (
(PHONE_OR_EMAIL_TYPE, "PHONE_OR_EMAIL"),
(LINK_TYPE, "LINK"),
Expand All @@ -28,6 +30,7 @@ class UnitConnection(models.Model):
(ESERVICE_LINK_TYPE, "ESERVICE_LINK"),
(PRICE_TYPE, "PRICE"),
(SUBGROUP_TYPE, "SUBGROUP"),
(OPENING_HOUR_OBJECT, "OPENING_HOUR_OBJECT"),
)

unit = models.ForeignKey(
Expand Down

0 comments on commit afe893a

Please sign in to comment.