Skip to content

Conversation

maze-runnar
Copy link
Contributor

related: fossasia/open-event-frontend#5359

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.

@maze-runnar maze-runnar changed the title fix: non-organizer user can'r set email null fix: non-organizer user can't set email null Oct 26, 2020
@auto-label auto-label bot added fix labels Oct 26, 2020
@codecov
Copy link

codecov bot commented Oct 26, 2020

Codecov Report

Merging #7378 into development will increase coverage by 0.00%.
The diff coverage is 75.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #7378   +/-   ##
============================================
  Coverage        64.24%   64.24%           
============================================
  Files              259      259           
  Lines            13133    13136    +3     
============================================
+ Hits              8437     8439    +2     
- Misses            4696     4697    +1     
Impacted Files Coverage Δ
app/api/speakers.py 68.86% <75.00%> (-0.07%) ⬇️

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 eff7e73...89a8dc6. Read the comment docs.

data['email'] = current_user.email

if (
not has_access('is_organizer', event_id=data['event'])
Copy link
Member

Choose a reason for hiding this comment

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

has_access('is_organizer', event_id=data['event']) is accessed already, so save it in a variable and reuse elsewhere

maze-runnar and others added 2 commits October 26, 2020 12:18
Co-authored-by: Areeb Jamal <[email protected]>
…y, so save it in a variable and reusing elsewhere
{'pointer': 'data/attributes/is_email_overridden'},
'Organizer access required to override email',
)
is_organizer = has_access('is_organizer', event_id=data['event'])
Copy link
Member

Choose a reason for hiding this comment

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

Used above this condition as well

@iamareebjamal iamareebjamal merged commit dd0bd76 into fossasia:development Oct 26, 2020
@maze-runnar maze-runnar deleted the patch-3 branch November 16, 2020 12:44
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.

2 participants