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: Allow organizer to override session form validation #7172

Merged
merged 3 commits into from
Jul 30, 2020

Conversation

iamareebjamal
Copy link
Member

@iamareebjamal iamareebjamal commented Jul 30, 2020

Fixes #7164

complex_field_values = data.get('complex_field_values', 'absent') # Set default to 'absent' to differentiate between None and not sent
is_absent = complex_field_values == 'absent' # True if values are not sent in data JSON
is_same = data.get('complex_field_values') == session.complex_field_values # Using original value to ensure None instead of absent
# We stop checking validations for organizers only if they may result in data change or absent. See test_session_forms_api.py for more info

Choose a reason for hiding this comment

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

line too long (147 > 90 characters)

# We allow organizers and admins to edit session without validations
complex_field_values = data.get('complex_field_values', 'absent') # Set default to 'absent' to differentiate between None and not sent
is_absent = complex_field_values == 'absent' # True if values are not sent in data JSON
is_same = data.get('complex_field_values') == session.complex_field_values # Using original value to ensure None instead of absent

Choose a reason for hiding this comment

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

at least two spaces before inline comment
line too long (138 > 90 characters)

)
# We allow organizers and admins to edit session without validations
complex_field_values = data.get('complex_field_values', 'absent') # Set default to 'absent' to differentiate between None and not sent
is_absent = complex_field_values == 'absent' # True if values are not sent in data JSON

Choose a reason for hiding this comment

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

at least two spaces before inline comment
line too long (95 > 90 characters)

'session', self.resource.schema, session, data
)
# We allow organizers and admins to edit session without validations
complex_field_values = data.get('complex_field_values', 'absent') # Set default to 'absent' to differentiate between None and not sent

Choose a reason for hiding this comment

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

at least two spaces before inline comment
line too long (142 > 90 characters)

@auto-label auto-label bot added the fix label Jul 30, 2020
'data': {
'type': 'session',
'id': str(session.id),
"attributes": {"state": "withdrawn",},

Choose a reason for hiding this comment

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

missing whitespace after ','

@iamareebjamal iamareebjamal merged commit 9d36946 into development Jul 30, 2020
@iamareebjamal iamareebjamal deleted the session-organizer-override branch July 30, 2020 03:46
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.

Saving session and speaker fails if created before addition of custom form
2 participants