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 ParseRole to save when using custom objectId's #338

Merged
merged 2 commits into from
Jan 29, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Jan 29, 2022

New Pull Request Checklist

Issue Description

When the SDK is allowing custom objectId's, new users and roles can't be saved to ParseRole's.

This occurs because a ParseRelation has a target of Pointer<ParseObject>. Since a Parse Pointer doesn't have createdAt, an error is being thrown.

Related issue: #n/a

Approach

Since an ParseOperation can occur on a ParseObject or a ParseRelation, only check if the objectId is present on the target.

TODOs before merging

  • Add tests
  • Add entry to changelog

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 29, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Jan 29, 2022

Codecov Report

Merging #338 (a1932a3) into main (aa02ed9) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
+ Coverage   85.10%   85.15%   +0.04%     
==========================================
  Files         114      114              
  Lines       12208    12208              
==========================================
+ Hits        10390    10396       +6     
+ Misses       1818     1812       -6     
Impacted Files Coverage Δ
Sources/ParseSwift/Types/ParseOperation.swift 97.59% <100.00%> (+2.88%) ⬆️

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 aa02ed9...a1932a3. Read the comment docs.

@cbaker6 cbaker6 merged commit 51e16d0 into parse-community:main Jan 29, 2022
@cbaker6 cbaker6 deleted the operation branch January 29, 2022 23:49
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.

None yet

1 participant