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

Don't make query if not needed #558

Merged
merged 2 commits into from
Aug 3, 2023
Merged

Conversation

lekoala
Copy link
Contributor

@lekoala lekoala commented Jun 22, 2023

setByIDList will make a query even though there are no DBHTMLText for this DataObject

Checking the presence of these fields allow to return early and prevent the needless query

Fixes #557

setByIDList will make a query even though there are no DBHTMLText for this DataObject

Checking the presence of these fields allow to return early and prevent the needless query
@lekoala
Copy link
Contributor Author

lekoala commented Jul 11, 2023

@michalkleiner any other wishes for this PR ?

Copy link
Contributor

@michalkleiner michalkleiner left a comment

Choose a reason for hiding this comment

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

I think this looks fine. What does @GuySartorelli think?

@GuySartorelli
Copy link
Member

GuySartorelli commented Jul 11, 2023

Arguably this is an enhancement and shouldn't be targeting CMS 4 - but given the very low risk of regression it's probably fine.
I have no problem with this change, feel free to merge

Copy link
Member

@GuySartorelli GuySartorelli 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, thanks

@GuySartorelli GuySartorelli merged commit 1730623 into silverstripe:1.13 Aug 3, 2023
9 checks passed
@lekoala
Copy link
Contributor Author

lekoala commented Aug 7, 2023

@GuySartorelli do you also apply this to the ss5 version or do i need to make a pr for that as well?

@GuySartorelli
Copy link
Member

@lekoala it'll get merged up, eventually. We're working on getting merge ups to be automated but for now they're just done ad hoc. If you need this immediately let me know and I'll make a point to do merge ups sooner rather than later.

@lekoala
Copy link
Contributor Author

lekoala commented Aug 7, 2023

@GuySartorelli i'm in the upgrade process to ss5 for my main client and that should go to production at the end of the summer, so if it's in a month or so that works for me :-)

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.

3 participants