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 speaker custom form logic and validation #7107

Merged
merged 3 commits into from
Jul 3, 2020

Conversation

iamareebjamal
Copy link
Member

Fixes #7074

@auto-label auto-label bot added the feature label Jul 3, 2020
@@ -32,14 +34,15 @@ def before_post(self, args, kwargs, data=None):
:param data:
:return:
"""
data['user'] = current_user.id

Choose a reason for hiding this comment

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

Black would make changes.

city=None,
heard_from=None,
user=user,
event__state='published',

Choose a reason for hiding this comment

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

Black would make changes.

@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #7107 into development will increase coverage by 0.50%.
The diff coverage is 90.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #7107      +/-   ##
===============================================
+ Coverage        62.00%   62.51%   +0.50%     
===============================================
  Files              262      262              
  Lines            13000    13006       +6     
===============================================
+ Hits              8061     8131      +70     
+ Misses            4939     4875      -64     
Impacted Files Coverage Δ
app/models/custom_form.py 97.95% <0.00%> (ø)
app/api/attendees.py 50.42% <100.00%> (ø)
app/api/helpers/speaker.py 90.00% <100.00%> (+40.00%) ⬆️
app/api/speakers.py 68.93% <100.00%> (+21.50%) ⬆️
app/api/schema/speakers.py 100.00% <0.00%> (+2.12%) ⬆️
app/api/helpers/permission_manager.py 50.69% <0.00%> (+13.98%) ⬆️

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 86dd502...fcab543. Read the comment docs.

@iamareebjamal iamareebjamal merged commit 120d121 into development Jul 3, 2020
@iamareebjamal iamareebjamal deleted the speaker-custom-form branch July 3, 2020 11:27
@niranjan94
Copy link
Member

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 1
           

Complexity increasing per file
==============================
- tests/all/integration/api/speaker/test_speaker_api.py  8
         

Clones added
============
- tests/all/integration/api/speaker/test_speaker_api.py  25
         

See the complete overview on Codacy

assert speaker.complex_field_values is None


def test_custom_form_create_complex_fields_missing_required(db, client, user, jwt):
Copy link
Member

Choose a reason for hiding this comment

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

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 custom form complex field validation
3 participants