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

Print a warning when the relations are invalid #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

domi4484
Copy link
Member

@domi4484 domi4484 commented Oct 5, 2024

This can happen if a relation is deleted after the widget was added to a layer configuration.

With this changes the issue persists but it logs a warning instead of throwing a python exception when trying to access referencedLayer()

@domi4484
Copy link
Member Author

domi4484 commented Oct 5, 2024

Still this can be quite difficult for a user to notice... Im not sure how we could improve the situation

@domi4484 domi4484 requested a review from signedav October 5, 2024 20:54
@signedav
Copy link
Member

signedav commented Oct 7, 2024

Im not sure how we could improve the situation

How is it solved on normal relation editor? On a quick test it seems that it's just ignored:
Uploading image.png…

This can happen if a relation is deleted after the widget was added
Log a warning instead of throwing a python exception when trying to
access referencedLayer()
@domi4484
Copy link
Member Author

domi4484 commented Oct 7, 2024

@signedav thanks for the review. Yes it QGIS it is just ignored. It would be good to add something visual like a warning logo or something like that in the layer properties.
For normal fields is the same, if you add a field per drag&drop, and remove it from the layer the widget remains in the configuration.

@domi4484 domi4484 requested a review from signedav October 7, 2024 10:18
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.

2 participants