diff --git a/CHANGELOG b/CHANGELOG index a7750d7a62e..0f91403a4ec 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,7 +2,7 @@ Changelog ********* -0.106.0 (2017-04-20) +0.106.0 (2017-04-21) ==================== - Registrations with 100+ nodes fail with content_length_mismatch error diff --git a/scripts/send_specific_registration_data_to_share.py b/scripts/send_specific_registration_data_to_share.py index 13082d2a375..bbed00d166b 100644 --- a/scripts/send_specific_registration_data_to_share.py +++ b/scripts/send_specific_registration_data_to_share.py @@ -4,20 +4,18 @@ import logging import sys import django -from django.db import transaction django.setup() from osf.models import AbstractNode from scripts import utils as script_utils from website import settings -from website.app import init_app +from website.app import setup_django from website.project.tasks import on_registration_updated logger = logging.getLogger(__name__) def migrate(registrations): - print registrations assert settings.SHARE_URL, 'SHARE_URL must be set to migrate.' assert settings.SHARE_API_TOKEN, 'SHARE_API_TOKEN must be set to migrate.' registrations_count = len(registrations) @@ -43,13 +41,12 @@ def main(): '--targets', action='store', dest='targets', - help='List of targets, of form {"data": ["registration_id", ...]}', + help='List of targets, of form ["registration_id", ...]', ) pargs = parser.parse_args() script_utils.add_file_logger(logger, __file__) - init_app(set_backends=True, routes=False) - with transaction.atomic(): - migrate(json.loads(pargs.targets)['data']) + setup_django() + migrate(json.loads(pargs.targets)) if __name__ == "__main__": main()