Skip to content

Commit

Permalink
Merge pull request #791 from Chia-Network/develop
Browse files Browse the repository at this point in the history
release: 1.2.22
  • Loading branch information
MichaelTaylor3D authored Jan 11, 2023
2 parents ceaf14d + 0d4c7f1 commit d50a78b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "climate-warehouse",
"version": "1.2.21",
"version": "1.2.22",
"private": true,
"bin": "build/server.js",
"type": "module",
Expand Down
4 changes: 4 additions & 0 deletions src/controllers/units.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ export const split = async (req, res) => {
newRecord.unitOwner = record.unitOwner;
}

if (record.unitStatus) {
newRecord.unitStatus = record.unitStatus;
}

if (record.countryJurisdictionOfOwner) {
newRecord.countryJurisdictionOfOwner =
record.countryJurisdictionOfOwner;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/string-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export function isPluralized(name) {
return name.endsWith('s');
}

export const genericFilterRegex = /(\w+):(.+):(in|eq|not|lt|gt|lte|gte)/;
export const genericFilterRegex = /(\w+):(.+):(in|eq|not|lt|gt|lte|gte|like)/;
export const isArrayRegex = /\[.+\]/;
export const genericSortColumnRegex = /(\w+):(ASC|DESC)/;
3 changes: 3 additions & 0 deletions src/validations/units.validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ export const unitsSplitSchema = Joi.object({
unitBlockStart: Joi.string().required(),
unitBlockEnd: Joi.string().required(),
unitOwner: Joi.string().optional(),
unitStatus: Joi.string()
.custom(pickListValidation('unitStatus'))
.optional(),
countryJurisdictionOfOwner: Joi.string()
.custom(pickListValidation('countries', 'countryJurisdictionOfOwner'))
.optional(),
Expand Down

0 comments on commit d50a78b

Please sign in to comment.