mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
fix: segment project null handling (#3300)
~~Should we handle this on the store layer instead~~? 🤔
Fixing this on the store layer. Effectively, frontend is able to send
`project: null` and even if that gets magically converted to `""` it's
OK since we're covering that use case on the store layer. Backend
response will be `project: null` as well, so it should be consistent.
This commit is contained in:
parent
55c69610ad
commit
db8d4d6f49
@ -68,7 +68,7 @@ export default class SegmentStore implements ISegmentStore {
|
||||
id: segment.id,
|
||||
name: segment.name,
|
||||
description: segment.description,
|
||||
segment_project_id: segment.project,
|
||||
segment_project_id: segment.project || null,
|
||||
constraints: JSON.stringify(segment.constraints),
|
||||
created_by: user.username || user.email,
|
||||
})
|
||||
@ -83,7 +83,7 @@ export default class SegmentStore implements ISegmentStore {
|
||||
.update({
|
||||
name: segment.name,
|
||||
description: segment.description,
|
||||
segment_project_id: segment.project,
|
||||
segment_project_id: segment.project || null,
|
||||
constraints: JSON.stringify(segment.constraints),
|
||||
})
|
||||
.returning(COLUMNS);
|
||||
|
Loading…
Reference in New Issue
Block a user