Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bcgov/range-api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 522b8e1518a5e74b9686c39f73f6618090a7b389
Choose a base ref
..
head repository: bcgov/range-api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 657f098afd5314e15d070abb0be32fb10259b439
Choose a head ref
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/libs/db2/model/plansnapshot.js
4 changes: 3 additions & 1 deletion src/libs/db2/model/plansnapshot.js
Original file line number Diff line number Diff line change
@@ -155,7 +155,9 @@ export default class PlanSnapshot extends Model {
}
const responseSorted = response.reverse();

const currentLegalVersion = responseSorted.find((resp) => [9, 12].indexOf(resp.snapshot.statusId) !== -1);
const currentLegalVersion = responseSorted.find(
(resp) => Plan.legalStatuses.indexOf(resp.snapshot.statusId) !== -1,
);
if (currentLegalVersion) currentLegalVersion.isCurrentLegalVersion = true;
return responseSorted;
}