From cdc19cd14f1c13aba675f9a9413aeef2d396b05b Mon Sep 17 00:00:00 2001 From: Jon Date: Wed, 18 Dec 2024 23:14:23 -0100 Subject: [PATCH] Fix some linting issues --- tom_targets/persistent_sharing_serializers.py | 4 +++- tom_targets/sharing.py | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tom_targets/persistent_sharing_serializers.py b/tom_targets/persistent_sharing_serializers.py index 0f155726..d2c4a867 100644 --- a/tom_targets/persistent_sharing_serializers.py +++ b/tom_targets/persistent_sharing_serializers.py @@ -6,7 +6,9 @@ class PersistentShareSerializer(serializers.ModelSerializer): - destination = serializers.ChoiceField(choices=get_sharing_destination_options(include_download=False), required=True) + destination = serializers.ChoiceField( + choices=get_sharing_destination_options(include_download=False), required=True + ) target = TargetFilteredPrimaryKeyRelatedField(queryset=Target.objects.all(), required=True) share_existing_data = serializers.BooleanField(default=False, required=False, write_only=True) diff --git a/tom_targets/sharing.py b/tom_targets/sharing.py index c9c4952f..ee20ad2d 100644 --- a/tom_targets/sharing.py +++ b/tom_targets/sharing.py @@ -24,11 +24,11 @@ def share_target_and_all_data(share_destination, target): destination, ReducedDatum.objects.filter(target=target), topic=hermes_topic) sharing = getattr(settings, "DATA_SHARING", {}) message = BuildHermesMessage(title=f"Setting up continuous sharing for {target.name} from " - f"{getattr(settings, 'TOM_NAME', 'TOM Toolkit')}.", - authors=sharing.get('hermes', {}).get('DEFAULT_AUTHORS', None), - message=None, - topic=hermes_topic - ) + f"{getattr(settings, 'TOM_NAME', 'TOM Toolkit')}.", + authors=sharing.get('hermes', {}).get('DEFAULT_AUTHORS', None), + message=None, + topic=hermes_topic + ) response = publish_to_hermes(message, filtered_reduced_datums) response.raise_for_status() else: