Skip to content

Commit

Permalink
Fixed merge conflicts from development
Browse files Browse the repository at this point in the history
  • Loading branch information
edwoodward committed Nov 16, 2023
2 parents 567feae + 8e0972e commit 6c4e117
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 3 deletions.
1 change: 1 addition & 0 deletions pages/migrations/0041_auto_20210506_1329.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import wagtail.fields



class Migration(migrations.Migration):

dependencies = [
Expand Down
1 change: 1 addition & 0 deletions pages/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
AllyLogos,
K12MainPage,
Assignable, ImpactStory)

from news.models import NewsIndex, PressIndex
from books.models import BookIndex
from shared.test_utilities import assertPathDoesNotRedirectToTrailingSlash, mock_user_login
Expand Down
1 change: 1 addition & 0 deletions salesforce/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from wagtail.models import Page
from wagtail.documents.models import Document


from shared.test_utilities import mock_user_login


Expand Down
4 changes: 4 additions & 0 deletions shared/tests.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from django.test import TestCase
from shared.test_utilities import mock_user_login, RequestMock
<<<<<<< HEAD
=======

>>>>>>> 8e0972ecb0cb613b6bf9a96425fc017e5fe918e7
from unittest.mock import MagicMock

class TestMockUserLogin(TestCase):
Expand Down
1 change: 1 addition & 0 deletions snippets/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,4 @@ def __str__(self):


register_snippet(AmazonBookBlurb)

2 changes: 2 additions & 0 deletions snippets/serializers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from .models import Role, Subject, K12Subject, ErrataContent, SubjectCategory, GiveBanner, BlogContentType, \
BlogCollection, NoWebinarMessage, WebinarCollection, AssignableAvailable, AmazonBookBlurb


from rest_framework import serializers, generics


Expand Down Expand Up @@ -141,3 +142,4 @@ class Meta:
fields = ('amazon_book_blurb',)
read_only_fields = ('amazon_book_blurb',)


2 changes: 2 additions & 0 deletions snippets/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
WebinarCollection, AssignableAvailable, AmazonBookBlurb



@receiver(post_save, sender=Subject)
def clear_cloudfront_on_subject_save(sender, **kwargs):
invalidate_cloudfront_caches('snippets/subjects')
Expand Down Expand Up @@ -54,3 +55,4 @@ def clear_cloudfront_on_assignable_available_save(sender, **kwargs):
@receiver(post_save, sender=AmazonBookBlurb)
def clear_cloudfront_on_amazon_book_blurb_save(sender, **kwargs):
invalidate_cloudfront_caches('snippets/amazonbookblurb')

2 changes: 2 additions & 0 deletions snippets/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from snippets.models import Subject, ErrataContent, GiveBanner, BlogContentType, NoWebinarMessage, K12Subject, \
FacultyResource, StudentResource, Role, SharedContent, NewsSource, SubjectCategory, BlogCollection, \
AssignableAvailable, AmazonBookBlurb

import snippets


Expand Down Expand Up @@ -75,6 +76,7 @@ def setUp(self):
amazon_book_blurb="Amazon Book Blurb. Amazon Book Blurb. Amazon Book Blurb.")
self.amazon_book_blurb.save()


def test_can_create_subject(self):
subject = Subject(name="Science", page_content="Science page content.", seo_title="Science SEO Title",
search_description="Science page description.")
Expand Down
1 change: 1 addition & 0 deletions snippets/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
router.register('webinarcollection', views.WebinarCollectionViewSet, basename="WebinarCollection")
router.register('assignableavailable', views.AssignableAvailableViewSet, basename="AssignableAvailable")
router.register('amazonbookblurb', views.AmazonBookBlurbViewSet, basename="AmazonBookBlurb")

urlpatterns = router.urls
1 change: 1 addition & 0 deletions snippets/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
GiveBannerSerializer, BlogContentTypeSerializer, BlogCollectionSerializer, NoWebinarMessageSerializer, \
WebinarCollectionSerializer, AssignableAvailableSerializer, AmazonBookBlurbSerializer


from rest_framework import generics, viewsets
from django_filters.rest_framework import DjangoFilterBackend

Expand Down
2 changes: 1 addition & 1 deletion wagtailimportexport/exporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def export_page(settings={'root_page': None, 'export_unpublished': False,
if settings['null_fk']:
functions.null_fks(page, data)

# Remove the owner of the page.
#Remove the owner of the page.
if settings['null_users'] and not data.get('owner'):
data['owner'] = None

Expand Down
3 changes: 2 additions & 1 deletion wagtailimportexport/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,5 @@ def content_type_by_model(model):
if not content_type:
return None
else:
return str(content_type[0].pk)
return str(content_type[0].pk)

3 changes: 2 additions & 1 deletion wagtailimportexport/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,5 @@ def update_page_references(model, pages_by_original_id):
# rather than updating an existing one
child.pk = None
# update page references on the child model, including the ParentalKey
update_page_references(child, pages_by_original_id)
update_page_references(child, pages_by_original_id)

0 comments on commit 6c4e117

Please sign in to comment.