Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
machristie committed Sep 26, 2023
2 parents 17d744d + 75ff283 commit 186a8c1
Show file tree
Hide file tree
Showing 21 changed files with 539 additions and 318 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

name: Build and Test
on: [push]
on: [push, pull_request]
jobs:
build-js:
runs-on: ubuntu-20.04
Expand Down
8 changes: 4 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
version: 2

# Set the version of Python and other tools you might need
# build:
# os: ubuntu-22.04
# tools:
# python: "3.10"
build:
os: ubuntu-22.04
tools:
python: "3.10"

mkdocs:
configuration: mkdocs.yml
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ on how to install Yarn 1 (Classic).
pip install -r requirements.txt
```

- **Windows note**: Use ```venv\Scripts\activate``` instead of ```source venv/bin/activate```
<!-- https://docs.python.org/3/library/venv.html -->

- **macOS note**: to install the MySQL dependencies you need to have the
MySQL development headers and libraries installed. Also, on macOS you need
to have openssl installed. See the
Expand Down
9 changes: 5 additions & 4 deletions django_airavata/apps/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
"vuex": "^3.6.2"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.8",
"@vue/cli-plugin-eslint": "~5.0.8",
"@vue/cli-service": "~5.0.8",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"prettier": "^2.1.2",
"vue-template-compiler": "^2.5.21",
"webpack-bundle-tracker": "^0.4.2-beta",
"eslint": "^7.32.0",
"@babel/eslint-parser": "^7.12.16",
"@babel/core": "^7.12.16"
"webpack": "5.0.0",
"webpack-bundle-tracker": "^0.4.2-beta"
},
"eslintConfig": {
"root": true,
Expand Down
501 changes: 496 additions & 5 deletions django_airavata/apps/auth/yarn.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

import json

from django.core.management.base import BaseCommand
from wagtail.core.models import PageRevision


class Command(BaseCommand):
help = "Fix the content_type id in the page revisions content_type which may be correct due to being imported from a different Django instance"

def handle(self, **options):
fixed_count = 0
for pr in PageRevision.objects.all():
content_json = json.loads(pr.content_json)
if content_json['content_type'] != pr.page.content_type.id:
content_json['content_type'] = pr.page.content_type.id
pr.content_json = json.dumps(content_json)
pr.save()
fixed_count = fixed_count + 1
if fixed_count > 0:
self.stdout.write(
self.style.SUCCESS(f"Successfully fixed the content type of {fixed_count} page revisions")
)
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@ def handle(self, **options):

call_command('loaddata', fixture_file, verbosity=0)
call_command('set_wagtail_site')
call_command('fix_page_revision_content_type')

print(f"{options['filename']} is loaded successfully....!")
self.stdout.write(
self.style.SUCCESS(f"{options['filename']} is loaded successfully....!")
)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 186a8c1

Please sign in to comment.