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 complex custom form validations #7073

Merged
merged 1 commit into from
Jun 23, 2020

Conversation

iamareebjamal
Copy link
Member

@iamareebjamal iamareebjamal commented Jun 23, 2020

Fix for #7074

@auto-label auto-label bot added the feature label Jun 23, 2020

if len(missing_required_fields) > 0:
raise UnprocessableEntityError(
{'pointer': '/data/attributes'},

Choose a reason for hiding this comment

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

Black would make changes.

@niranjan94
Copy link
Member

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

Issues
======
- Added 1
           

Complexity increasing per file
==============================
- app/api/helpers/custom_forms.py  7
         

Complexity decreasing per file
==============================
+ tests/all/integration/api/attendee/test_attendee_api.py  -5
         

Clones added
============
- tests/all/integration/api/attendee/test_attendee_api.py  9
         

See the complete overview on Codacy

assert attendee.complex_field_values is None


def test_custom_form_complex_fields_missing_required_one(db, client, jwt):
Copy link
Member

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Jun 23, 2020

Codecov Report

Merging #7073 into development will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #7073      +/-   ##
===============================================
+ Coverage        61.81%   61.86%   +0.04%     
===============================================
  Files              260      261       +1     
  Lines            12929    12940      +11     
===============================================
+ Hits              7992     8005      +13     
+ Misses            4937     4935       -2     
Impacted Files Coverage Δ
app/models/__init__.py 100.00% <ø> (ø)
app/api/attendees.py 49.13% <100.00%> (-5.13%) ⬇️
app/api/helpers/custom_forms.py 100.00% <100.00%> (ø)
app/api/helpers/validations.py 75.00% <0.00%> (+25.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 17ddb87...5800da4. Read the comment docs.

@iamareebjamal iamareebjamal merged commit 7950499 into development Jun 23, 2020
@iamareebjamal iamareebjamal deleted the custom-form/complex-validate branch June 23, 2020 05:09
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.

3 participants