Repository navigation
fix(desks): CSV import no longer erases desk data - #657
Merged
Merged
Conversation
- CSV import passes plain rows, so columns missing from the CSV no longer overwrite the matched desk asset with Desk defaults. - One findDeskByLegacyId helper resolves old desk ids for check-in codes, desk links, CSV import and favourites. - Check-in codes and desk links search the org zone, and desk links load the desk's building before they use it. - Asset InZone queries return nothing for an empty zone id. - The mock assets API filters on zones and builds parking per level. - queryAllAssetPages stops after 100 pages and has a typed query.
|
Deployment failed for project frontend-templates with the following error: Learn More: https://vercel.com/placeos?upgradeToPro=build-rate-limit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These review fixes for #656 missed its merge, so
developstill has the problems below.Problem: A concierge CSV import erased desk data. Each row was made into a
Desk, which fills every missing column with a default, and those defaults then replaced the matched desk asset's values. A CSV without animages,groups,assigned_toorbookablecolumn removed those values from the desk. The desk CSV export always dropsimages, so re-importing an export also removed images.Fix: The CSV import now passes plain rows. Only the columns that are in the CSV change the existing desk.
Other fixes from the same review:
findDeskByLegacyIdhelper finds desks for check-in codes, desk links, CSV import and favourites. It replaces four lookups that matched in different ways. Old CSV rows whosemap_idis not theiridnow update their migrated desk and do not make a duplicate.*InZoneasset queries return no assets for an empty zone id (for example, before the building loads). Before, they sent an emptyzonesfilter.zonesand makes parking spaces for each parking level.queryAllAssetPagesstops after 100 pages and its query has a type.Not in this PR: moving the favourites migration into init
migrate:desk_assets. That change is in PlaceOS/init.Tests pass for assets, mocks, bookings, concierge and workplace. The concierge and workplace builds pass.
Reviewed with sol-loop: 3 rounds with gpt-6.1-sol on xhigh. Sol verdict: approved
Created with Claude Opus 5.5 in Claude Code (T3 Code). Reviewed by gpt-6.1-sol in Codex.
🤖 Generated with Claude Code