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

Ignore usertype when searching for Common dir #4332

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

realVinayak
Copy link
Contributor

@realVinayak realVinayak commented Dec 27, 2023

Implements second solution in
#3956 (comment)

Note: This will cause unexpected behavior if resources with same name appears under multiple usertypes at Global level ("Common"). I don't know if that case happens or not.

@grantfitzsimmons Have you ever seen that?

Testing instructions:

These are specific to insectcollection_umn database on the test panel.

  1. Create ExportFeed resource under the Global Resources, so at the top level. It is fine if the ExportFeed is empty:
    image

  2. Run the feed by clicking on "Create DwC Archive" in User Tools
    image

  3. This branch should "run" the feed (you will not get actual results till you set the feed correctly). However, xml-editor should give a notification with the error message saying "MissingFeedResource" somewhere in the crash report.

@realVinayak realVinayak added this to the 7.9.4 milestone Dec 27, 2023
specifyweb/context/app_resource.py Outdated Show resolved Hide resolved
specifyweb/export/feed.py Show resolved Hide resolved
Copy link
Member

@maxpatiiuk maxpatiiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@realVinayak realVinayak marked this pull request as ready for review January 2, 2024 18:33
@realVinayak realVinayak requested a review from a team January 2, 2024 18:33
Copy link
Collaborator

@emenslin emenslin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, did not get the notification with the error message.

@grantfitzsimmons
Copy link
Member

Note: This will cause unexpected behavior if resources with same name appears under multiple usertypes at Global level ("Common"). I don't know if that case happens or not.

@grantfitzsimmons Have you ever seen that?

I can't think of situations like this at the global level, but I would not endorse it.

@CarolineDenis CarolineDenis merged commit 3b468ec into xml-editor Jan 10, 2024
9 checks passed
@CarolineDenis CarolineDenis deleted the issue-3956-backend branch January 10, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Creating a new resource at the 'Global' level sets the user group as 'prefs'
5 participants