Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add is_ticket_form_enabled field #5934

Merged
merged 1 commit into from Jun 2, 2019

Conversation

uds5501
Copy link
Contributor

@uds5501 uds5501 commented May 20, 2019

Fixes #5933

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

Changes proposed in this pull request:

  • add is_ticket_form_enabled field in event model
  • provide the migration file

@codecov
Copy link

codecov bot commented May 20, 2019

Codecov Report

Merging #5934 into development will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@              Coverage Diff               @@
##           development   #5934      +/-   ##
==============================================
+ Coverage        66.39%   66.4%   +<.01%     
==============================================
  Files              286     286              
  Lines            13958   13961       +3     
==============================================
+ Hits              9268    9271       +3     
  Misses            4690    4690
Impacted Files Coverage Δ
app/api/schema/events.py 89.79% <100%> (+0.06%) ⬆️
app/models/event.py 81.64% <100%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad322e3...0b78a68. Read the comment docs.

@uds5501
Copy link
Contributor Author

uds5501 commented May 20, 2019

@iamareebjamal @shreyanshdwivedi please review

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('events', sa.Column('is_ticket_form_enabled', sa.Boolean(), server_default='False', nullable=False))
op.add_column('events_version', sa.Column('is_ticket_form_enabled', sa.Boolean(), server_default='False', autoincrement=False, nullable=True))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uds5501 don't you think autoincrement=False should be removed and nullable should be false here?

Copy link
Contributor

@abhinavk96 abhinavk96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uds5501 What will be the implications of this field being false for the past events? If default is false, then all the events will have ticketing form disabled.

@uds5501
Copy link
Contributor Author

uds5501 commented May 20, 2019

@CosmicCoder96 at the moment the order form is created despite the value of this field in the frontend. Although you are right, the default value of this property should be true, we want to have an activated attendee form, I will update this. Also, @shreyanshdwivedi thanks for pointing that out, will be updating that as well

Copy link
Member

@shreyanshdwivedi shreyanshdwivedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@iamareebjamal iamareebjamal merged commit fdf1bd4 into fossasia:development Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new field for attendee form activation
5 participants