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

fix: make annoucement filed in speakers call nullable #7435

Merged
merged 5 commits into from
Nov 12, 2020
Merged

fix: make annoucement filed in speakers call nullable #7435

merged 5 commits into from
Nov 12, 2020

Conversation

maze-runnar
Copy link
Contributor

Fixes fossasia/open-event-frontend#5578

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.

@auto-label auto-label bot added the fix label Nov 12, 2020

def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('speakers_calls', 'announcement',
Copy link
Member

Choose a reason for hiding this comment

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

After this line, please add statement for converting empty string to null as well

@@ -54,7 +54,7 @@ def validate_date(self, data, original_data):
# "speakers-call ends-at should be before event starts-at")

id = fields.Str(dump_only=True)
announcement = fields.Str(required=True)
announcement = fields.Str(required=False)
Copy link
Member

Choose a reason for hiding this comment

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

Should be allow_none=True

@codecov
Copy link

codecov bot commented Nov 12, 2020

Codecov Report

Merging #7435 (01a65f4) into development (3d70017) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #7435   +/-   ##
============================================
  Coverage        65.29%   65.29%           
============================================
  Files              265      265           
  Lines            13217    13217           
============================================
  Hits              8630     8630           
  Misses            4587     4587           
Impacted Files Coverage Δ
app/api/schema/speakers_calls.py 100.00% <100.00%> (ø)
app/models/speakers_call.py 93.33% <100.00%> (ø)

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 3d70017...01a65f4. Read the comment docs.

@iamareebjamal
Copy link
Member

Missing #7435 (comment)

@maze-runnar
Copy link
Contributor Author

Missing #7435 (comment)

yes, I don't exactly know how to do that. Trying to find

@iamareebjamal
Copy link
Member

iamareebjamal commented Nov 12, 2020

op.execute("update speakers_calls set announcement = null where announcement = ''")

@iamareebjamal iamareebjamal merged commit 8469770 into fossasia:development Nov 12, 2020
@maze-runnar maze-runnar deleted the patch-5 branch December 27, 2020 15:58
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.

Call for Speakers: Event Showing Up on Frontpage even though CfS is deactivated
2 participants