Skip to content

Commit

Permalink
Remove require_introduction from the reservation unit model
Browse files Browse the repository at this point in the history
  • Loading branch information
matti-lamppu committed Feb 5, 2025
1 parent 5b53221 commit 5b68dc2
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 21 deletions.
4 changes: 0 additions & 4 deletions locale/fi/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -1735,10 +1735,6 @@ msgstr "Tarkenteet"
msgid "Reservation unit type"
msgstr "Varausyksikön tyyppi"

#: tilavarauspalvelu/admin/reservation_unit/form.py
msgid "Require introduction"
msgstr "Vaatii perehdytyksen"

#: tilavarauspalvelu/admin/reservation_unit/form.py
msgid "Equipments"
msgstr "Varusteet"
Expand Down
4 changes: 0 additions & 4 deletions locale/sv/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -1686,10 +1686,6 @@ msgstr ""
msgid "Reservation unit type"
msgstr ""

#: tilavarauspalvelu/admin/reservation_unit/form.py
msgid "Require introduction"
msgstr ""

#: tilavarauspalvelu/admin/reservation_unit/form.py
msgid "Equipments"
msgstr ""
Expand Down
1 change: 0 additions & 1 deletion tests/factories/reservation_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ class Meta:
# Booleans
is_draft = False
is_archived = False
require_introduction = False
require_adult_reservee = False
require_reservation_handling = False
reservation_block_whole_day = False
Expand Down
1 change: 0 additions & 1 deletion tests/test_csv_exporters/test_reservation_unit_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ def test_reservation_unit_export_multiple():
assert row_2[next(index)] == reservation_unit_1.allow_reservations_without_opening_hours
assert row_2[next(index)] == reservation_unit_1.is_archived
assert row_2[next(index)] == reservation_unit_1.purposes.first().name_fi
assert row_2[next(index)] == reservation_unit_1.require_introduction
assert row_2[next(index)] == reservation_unit_1.equipments.first().name_fi
assert row_2[next(index)] == reservation_unit_1.publishing_state
assert row_2[next(index)] == reservation_unit_1.reservation_state
Expand Down
2 changes: 0 additions & 2 deletions tests/test_graphql_api/test_reservation_unit/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ def test_reservation_unit__query__all_fields(graphql):
isDraft
isArchived
requireIntroduction
requireReservationHandling
reservationBlockWholeDay
canApplyFreeOfCharge
Expand Down Expand Up @@ -220,7 +219,6 @@ def test_reservation_unit__query__all_fields(graphql):
#
"isDraft": reservation_unit.is_draft,
"isArchived": reservation_unit.is_archived,
"requireIntroduction": reservation_unit.require_introduction,
"requireReservationHandling": reservation_unit.require_reservation_handling,
"reservationBlockWholeDay": reservation_unit.reservation_block_whole_day,
"canApplyFreeOfCharge": reservation_unit.can_apply_free_of_charge,
Expand Down
1 change: 0 additions & 1 deletion tilavarauspalvelu/admin/reservation_unit/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class ReservationUnitAdmin(SortableAdminMixin, TabbedTranslationAdmin):
"metadata_set",
"origin_hauki_resource",
"allow_reservations_without_opening_hours",
"require_introduction",
"require_adult_reservee",
"require_reservation_handling",
"reservation_block_whole_day",
Expand Down
2 changes: 0 additions & 2 deletions tilavarauspalvelu/admin/reservation_unit/form.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class Meta:
"purposes": _("Purposes"),
"qualifiers": _("Qualifiers"),
"reservation_unit_type": _("Reservation unit type"),
"require_introduction": _("Require introduction"),
"equipments": _("Equipments"),
"terms_of_use": _("Terms of use"),
"terms_of_use_fi": _("Terms of use (Finnish)"),
Expand Down Expand Up @@ -141,7 +140,6 @@ class Meta:
"purposes": _("Purposes"),
"qualifiers": _("Qualifiers"),
"reservation_unit_type": _("Reservation unit type"),
"require_introduction": _("Require introduction"),
"equipments": _("Equipments"),
"terms_of_use": _("Terms of use"),
"terms_of_use_fi": _("Terms of use (Finnish)"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class Meta:
# Booleans
"is_draft",
"is_archived",
"require_introduction",
"require_reservation_handling",
"reservation_block_whole_day",
"can_apply_free_of_charge",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ class Meta:
# Booleans
"is_draft",
"is_archived",
"require_introduction",
"require_reservation_handling",
"reservation_block_whole_day",
"can_apply_free_of_charge",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.1.3 on 2024-12-11 08:26
from __future__ import annotations

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("tilavarauspalvelu", "0065_reservation_access_code_generated_at_and_more"),
]

operations = [
migrations.RemoveField(
model_name="reservationunit",
name="require_introduction",
),
]
1 change: 0 additions & 1 deletion tilavarauspalvelu/models/reservation_unit/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ class ReservationUnit(models.Model):

is_draft: bool = models.BooleanField(default=False, blank=True, db_index=True)
is_archived: bool = models.BooleanField(default=False, db_index=True)
require_introduction: bool = models.BooleanField(default=False)
require_adult_reservee: bool = models.BooleanField(default=False, blank=True)
require_reservation_handling: bool = models.BooleanField(default=False, blank=True)
reservation_block_whole_day: bool = models.BooleanField(default=False, blank=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ class ReservationUnitExportRow(BaseExportRow):
allow_reservations_without_opening_hours: str | bool = ""
is_reservation_unit_archived: str | bool = ""
purposes: str = ""
require_introduction: str | bool = ""
equipments: str = ""
state: str = ""
reservation_state: str = ""
Expand Down Expand Up @@ -224,7 +223,6 @@ def get_header_rows(self) -> Iterable[ReservationUnitExportRow]:
allow_reservations_without_opening_hours="Allow reservations without opening hours",
is_reservation_unit_archived="Is reservation unit archived",
purposes="Purposes",
require_introduction="Require introduction",
equipments="Equipments",
state="State",
reservation_state="Reservation state",
Expand Down Expand Up @@ -331,7 +329,6 @@ def get_data_rows(self, instance: ReservationUnit) -> Iterable[ReservationUnitEx
allow_reservations_without_opening_hours=instance.allow_reservations_without_opening_hours,
is_reservation_unit_archived=instance.is_archived,
purposes=", ".join(purpose.name_fi for purpose in instance.purposes.all()),
require_introduction=instance.require_introduction,
equipments=", ".join(equipment.name_fi for equipment in instance.equipments.all()),
state=instance.publishing_state,
reservation_state=instance.reservation_state,
Expand Down

0 comments on commit 5b68dc2

Please sign in to comment.