Skip to content

feat(api): return result from SaveMixin.save() #1832

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

Merged
merged 1 commit into from
Jan 13, 2022
Merged

Conversation

JohnVillalovos
Copy link
Member

@JohnVillalovos JohnVillalovos commented Jan 13, 2022

Return the new object data when calling SaveMixin.save().

Also remove check for None value when calling
self.manager.update() as that method only returns a dictionary.

Closes #1081.

@nejch
Copy link
Member

nejch commented Jan 13, 2022

@JohnVillalovos I think we want this in the changelog so maybe even feat :)

@JohnVillalovos JohnVillalovos changed the title chore(api): return result from SaveMixin.save() feat(api): return result from SaveMixin.save() Jan 13, 2022
@JohnVillalovos
Copy link
Member Author

@JohnVillalovos I think we want this in the changelog so maybe even feat :)

Sure! Done.

@nejch
Copy link
Member

nejch commented Jan 13, 2022

@kernelport I've marked this as closing #1081 since it implements the rest of your PR. Feel free to reopen the issue if it's not solved after the release. You'll be credited as the author of the commit here.

@JohnVillalovos JohnVillalovos force-pushed the jlvillal/return_save branch 2 times, most recently from fc8cd44 to d90443c Compare January 13, 2022 22:57
Return the new object data when calling `SaveMixin.save()`.

Also remove check for `None` value when calling
`self.manager.update()` as that method only returns a dictionary.

Closes: #1081
@nejch nejch enabled auto-merge January 13, 2022 23:34
@codecov-commenter
Copy link

Codecov Report

Merging #1832 (e6258a4) into main (8b14ff0) will not change coverage.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##             main    #1832   +/-   ##
=======================================
  Coverage   92.20%   92.20%           
=======================================
  Files          77       77           
  Lines        4834     4834           
=======================================
  Hits         4457     4457           
  Misses        377      377           
Flag Coverage Δ
cli_func_v4 81.38% <25.00%> (ø)
py_func_v4 80.20% <75.00%> (ø)
unit 83.20% <75.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/mixins.py 91.50% <75.00%> (ø)

@nejch nejch merged commit 27e0742 into main Jan 13, 2022
@nejch nejch deleted the jlvillal/return_save branch January 13, 2022 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: project.wikis page.save() should return the updated page
4 participants