This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#177] Ensure DB-Connected configuration is properly updated
The Admin UI sends the entire DB-Connected resource across in every request. This raises an issue, because the `resource_class` is always sent as a `null` value (as we do not want to reference "virtual" resource classes for purposes of the source code view modal). Because this is `null`, we end up updating a null value. We can get the `resource_class` when fetching the original service data by passing a boolean `false` to the `$isAFetchOperation` flag; this forces the DB-Connected `onFetch()` listener to include it when returning the entity. However... we were not passing that flag when doing `updateService()` operations, which meant that updating a DB-Connected service always wrote the DB-Connected configuration under a blank key. This patch does two things: - It now passes the `$isAFetchOperation` flag for update operations. - It now pulls the `resource_class` from the updated REST entity prior to performing db-connected-specific update oparations.
- Loading branch information