fix: update download_settings host changes without re-saving the main host - #712
Conversation
… host When a host is used as another host's xhttp download_settings, editing that host alone did not update the main host's cached data. Now, saving a host also refreshes every host that points to it as their download_settings.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
its better to have a query param for |
|
@M03ED Fair point, but I don't think it's worth the added complexity here. Hosts aren't a high-cardinality table like users — realistically dozens, maybe a couple hundred on the largest setups — and this query only runs when an admin explicitly saves a host, not on the subscription-serving hot path. A SQL-level filter would also need separate handling per DB dialect. Happy to remake if host counts become a real problem, but for now I'd rather keep the simple way. |
Summary
When a host is used as another host's xhttp download_settings, editing that host alone did not update the main host's cached data. Now, saving a host also refreshes every host that points to it as their download_settings.
Type of change
Checklist