-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
539 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
# | ||
|
||
name: Build and Test | ||
on: [push] | ||
on: [push, pull_request] | ||
jobs: | ||
build-js: | ||
runs-on: ubuntu-20.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
django_airavata/wagtailapps/base/management/commands/fix_page_revision_content_type.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_cybergateway_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_default_gateway.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_hpcgateway_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_nanoconfinement_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_osu_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_phasta_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_seagrid_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_searching_sra_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_simccs_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_simvascular_data.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
django_airavata/wagtailapps/base/management/commands/load_siu_data.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.