Skip to content

Commit

Permalink
Use server_default for migrations, and fix a logic error from my sugg…
Browse files Browse the repository at this point in the history
…estion (#549)
  • Loading branch information
MelissaAutumn authored Jul 16, 2024
1 parent 617e6a4 commit 0d941f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""
from alembic import op
import sqlalchemy as sa

from sqlalchemy import true

# revision identifiers, used by Alembic.
revision = 'fb1feb76c467'
Expand All @@ -17,7 +17,7 @@


def upgrade() -> None:
op.add_column('schedules', sa.Column('booking_confirmation', sa.Boolean, nullable=False, default=True, index=True))
op.add_column('schedules', sa.Column('booking_confirmation', sa.Boolean, nullable=False, server_default=true(), index=True))


def downgrade() -> None:
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/BookingView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<booking-view-success
:attendee-email="attendee.email"
:selected-event="selectedEvent"
:requested="appointment.booking_confirmation"
:requested="appointment?.booking_confirmation"
/>
</main>
<!-- booking page content: time slot selection -->
Expand All @@ -42,7 +42,7 @@
<booking-modal
:open="showBookingModal"
:event="selectedEvent"
:requires-confirmation="appointment.booking_confirmation"
:requires-confirmation="appointment?.booking_confirmation"
@book="bookEvent"
@close="closeModal()"
/>
Expand Down

0 comments on commit 0d941f8

Please sign in to comment.