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 user relationship in speaker schema dump_only #7122

Merged
merged 3 commits into from
Jul 9, 2020

Conversation

Haider8
Copy link
Contributor

@Haider8 Haider8 commented Jul 8, 2020

Fixes #7106

Short description of what this resolves:

Speaker schema can receive user relationship which is not needed for POST and PATCH

Changes proposed in this pull request:

Make user relationship in speaker schema dump_only and instead assign current user's id to user relationship.

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 Jul 8, 2020
@codecov
Copy link

codecov bot commented Jul 8, 2020

Codecov Report

Merging #7122 into development will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #7122   +/-   ##
============================================
  Coverage        62.84%   62.84%           
============================================
  Files              262      262           
  Lines            13011    13011           
============================================
  Hits              8177     8177           
  Misses            4834     4834           
Impacted Files Coverage Δ
app/api/schema/speakers.py 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 3808067...75321fc. Read the comment docs.

@iamareebjamal
Copy link
Member

user shouldn't be changed on editing

@iamareebjamal
Copy link
Member

Have you tested that user is properly set on creating a speaker

@Haider8
Copy link
Contributor Author

Haider8 commented Jul 9, 2020

Yes

@iamareebjamal iamareebjamal merged commit e53a707 into fossasia:development Jul 9, 2020
@Haider8 Haider8 deleted the issue-7106 branch July 9, 2020 20:31
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.

Speaker Schema should not receive user relationship
2 participants