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

fixes invalid relation in search form #37137

Merged
merged 2 commits into from
Jul 7, 2020
Merged

fixes invalid relation in search form #37137

merged 2 commits into from
Jul 7, 2020

Conversation

3nids
Copy link
Member

@3nids 3nids commented Jun 11, 2020

fixes #34410

If the relation is not defined in the config, guess it from the layer.
The config is empty while we are initalizing the attribute form of the referencing layer for the search widget wrapper.
There might be a better (more correct) fix by correctly initializing the form but I could not easily find out.
This approach sounds reasonable to me.

@stale
Copy link

stale bot commented Jul 3, 2020

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@stale stale bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 3, 2020
@agiudiceandrea
Copy link
Contributor

Could this be merged?

@stale stale bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 3, 2020
@m-kuhn
Copy link
Member

m-kuhn commented Jul 4, 2020

There might be a better (more correct) fix by correctly initializing the form but I could not easily find out.

Agreed, that's why I postponed for so long.
In short, while it's possible to have multiple relations defined for a field, this will always take the first one. In practice this will very often be sufficient. So let's merge.
However, the first one who will run into this limitation will be very surprised.

@3nids
Copy link
Member Author

3nids commented Jul 7, 2020

or we do this, only if there is a single relation existing?

@m-kuhn
Copy link
Member

m-kuhn commented Jul 7, 2020

or we do this, only if there is a single relation existing?

That would make it more transparent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants