diff --git a/.deepsource.toml b/.deepsource.toml new file mode 100644 index 0000000000..133b3d6963 --- /dev/null +++ b/.deepsource.toml @@ -0,0 +1,15 @@ +version = 1 + +[[analyzers]] +name = "javascript" +enabled = true + + [analyzers.meta] + plugins = ["vue"] + +[[analyzers]] +name = "python" +enabled = true + + [analyzers.meta] + runtime_version = "3.x.x" diff --git a/.github/workflows/frontendlint.yml b/.github/workflows/frontendlint.yml index 589dc66380..51e2759020 100644 --- a/.github/workflows/frontendlint.yml +++ b/.github/workflows/frontendlint.yml @@ -38,4 +38,22 @@ jobs: yarn --frozen-lockfile npm rebuild node-sass - name: Run tests - run: yarn run lint-all + run: yarn run lint-all:fix + - name: Check for modified files + if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository + id: git-check + run: echo ::set-output name=modified::$(git diff-index --name-only HEAD) + - uses: tibdex/github-app-token@v1 + if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository && steps.git-check.outputs.modified != '' + id: generate-token + with: + app_id: ${{ secrets.CODE_FIX_APP_ID }} + private_key: ${{ secrets.CODE_FIX_APP_PRIVATE_KEY }} + - name: Push changes + if: github.event.pull_request && github.event.pull_request.head.repo.full_name == github.repository && steps.git-check.outputs.modified != '' + run: | + git config --global user.name 'Learning Equality' + git config --global user.email 'dev@learningequality.org' + git remote set-url origin https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/${{ github.repository }} + git commit -am "Frontend linting of ${{ steps.git-check.outputs.modified }}" + git push diff --git a/contentcuration/contentcuration/db/models/manager.py b/contentcuration/contentcuration/db/models/manager.py index 602ea24b75..12488dce9f 100644 --- a/contentcuration/contentcuration/db/models/manager.py +++ b/contentcuration/contentcuration/db/models/manager.py @@ -394,35 +394,34 @@ def _copy( if progress_tracker: progress_tracker.increment(len(copied_nodes)) return copied_nodes - else: - node_copy = self._shallow_copy( - node, - target, - position, + node_copy = self._shallow_copy( + node, + target, + position, + source_channel_id, + pk, + mods, + can_edit_source_channel, + ) + if progress_tracker: + progress_tracker.increment() + children = node.get_children().order_by("lft") + if excluded_descendants: + children = children.exclude(node_id__in=excluded_descendants.keys()) + for child in children: + self._copy( + child, + node_copy, + "last-child", source_channel_id, - pk, - mods, + None, + None, + excluded_descendants, can_edit_source_channel, + batch_size, + progress_tracker=progress_tracker, ) - if progress_tracker: - progress_tracker.increment() - children = node.get_children().order_by("lft") - if excluded_descendants: - children = children.exclude(node_id__in=excluded_descendants.keys()) - for child in children: - self._copy( - child, - node_copy, - "last-child", - source_channel_id, - None, - None, - excluded_descendants, - can_edit_source_channel, - batch_size, - progress_tracker=progress_tracker, - ) - return [node_copy] + return [node_copy] def _copy_tags(self, source_copy_id_map): from contentcuration.models import ContentTag diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue index 6e590d4142..aab2c0be9e 100644 --- a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue +++ b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue @@ -20,7 +20,9 @@ {{ registrationFailed ? $tr('registrationFailed') : $tr('errorsMessage') }} - + + {{ $tr('registrationFailedOffline') }} +

{{ $tr('basicInformationHeader') }} @@ -157,7 +159,7 @@

{{ $tr('contactMessage') }}

- + {{ $tr('finishButton') }} @@ -171,7 +173,7 @@