1586 custom target sharing#1588
Open
Fingel wants to merge 4 commits into
Open
Conversation
This appears to have been broken for users that use custom targets. It only worked for non-custom targets by coincidence - PersistentShare has the same app label as the default target object. As soon as a custom target model is used, the app label changes (for example custom_code) but then the permissions don't match. They need to be tom_targets.add_persistentshare, for example, not custom_code.add_persistenceshare.
jchate6
requested changes
Jul 1, 2026
jchate6
left a comment
Contributor
There was a problem hiding this comment.
testing this, I'm getting a "POST /api/targets/ HTTP/1.1" 400 64 in the receiving TOM, and ERROR: Returned Response code 400 with content: b'{"targetextra_set":[{"value":["Not a valid string."]},{},{},{}]}' as an error message in my sending TOM that has a custom Target.
I have several additional fields in my extended target model.
Thoughts?
3 tasks
Contributor
Author
|
I couldn't reproduce this with additional custom fields. Could this be an authentication issue masking the actual sharing? Do you have permissions with the auth key you are using for the user on Tom B? In any case, I added a string cast to the target extra value, though it should work with values of other types. |
Contributor
|
ok, I'll try to figure out what' going on. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When sharing, converts custom target model fields to target extras for the destination tom by comparing the custom model ._meta.fields() with the BaseTarget._meta.fields()
Two other fixes:
2279497 Sharing was broken for custom targets to begin with due to mismatched app labels
de44131 fix submit button being placed at the bottom of the screen far away from everything
Fixes #1586