diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..2a573c2e2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + pull_request: + +permissions: + contents: read + +jobs: + lint-and-create-data: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: npm ci --ignore-scripts + + - name: Run lint + run: npm run lint + + - name: Run create-data + run: npm run create-data diff --git a/app/models/patient.js b/app/models/patient.js index 795f4ec4d..409384f1e 100644 --- a/app/models/patient.js +++ b/app/models/patient.js @@ -200,7 +200,7 @@ export class Patient extends Child { ) } - let move; + let move if (this.context.moves) { move = Move.findAll(this.context).find( (move) => move.patient_uuid === this.uuid