diff --git a/amy/api/v1/serializers.py b/amy/api/v1/serializers.py index e30935102..f472597bf 100644 --- a/amy/api/v1/serializers.py +++ b/amy/api/v1/serializers.py @@ -119,6 +119,7 @@ class Meta: "country", "github", "twitter", + "bluesky", "url", "orcid", "affiliation", @@ -492,6 +493,7 @@ class Meta: "country", "github", "twitter", + "bluesky", "url", "orcid", "affiliation", diff --git a/amy/api/v1/tests/test_export.py b/amy/api/v1/tests/test_export.py index 1cb591dbc..685ad86d0 100644 --- a/amy/api/v1/tests/test_export.py +++ b/amy/api/v1/tests/test_export.py @@ -297,6 +297,7 @@ def test_all_related_objects_shown(self): "gender", "github", "twitter", + "bluesky", "url", "user_notes", "affiliation", diff --git a/amy/api/v2/serializers.py b/amy/api/v2/serializers.py index 87f054776..8bc69a874 100644 --- a/amy/api/v2/serializers.py +++ b/amy/api/v2/serializers.py @@ -245,6 +245,7 @@ class Meta: "airport", "github", "twitter", + "bluesky", "url", "user_notes", "affiliation", @@ -304,8 +305,6 @@ class Meta: "event", "person", "role", - "title", - "url", "seat_membership", "seat_public", "seat_open_training", diff --git a/amy/autoemails/actions.py b/amy/autoemails/actions.py index 5c5646d3a..177b2ef0c 100644 --- a/amy/autoemails/actions.py +++ b/amy/autoemails/actions.py @@ -788,7 +788,7 @@ def get_additional_context(self, objects, *args, **kwargs): task_emails = [t.person.email for t in tasks] contacts = event.contact.split(TAG_SEPARATOR) - context["all_emails"] = list(filter(bool, task_emails + contacts)) + context["all_emails"] = sorted(filter(bool, task_emails + contacts)) context["assignee"] = ( event.assigned_to.full_name if event.assigned_to else "Regional Coordinator" diff --git a/amy/autoemails/tests/test_instructorshostintroductionaction.py b/amy/autoemails/tests/test_instructorshostintroductionaction.py index a367a8631..130aae65e 100644 --- a/amy/autoemails/tests/test_instructorshostintroductionaction.py +++ b/amy/autoemails/tests/test_instructorshostintroductionaction.py @@ -250,13 +250,13 @@ def testContext(self): supporting_instructor2=supporting_instructor2.person, hosts=[host.person], all_emails=[ - "hp@magic.uk", - "rw@magic.uk", "hg@magic.uk", - "peter@webslinger.net", + "hp@magic.uk", "me@stark.com", - "test@hogwart.com", + "peter@webslinger.net", + "rw@magic.uk", "test2@magic.uk", + "test@hogwart.com", ], assignee="Regional Coordinator", tags=["automated-email", "LC"], @@ -314,11 +314,11 @@ def testRecipients(self): self.assertEqual( email.to, [ + "hg@magic.uk", "hp@magic.uk", "rw@magic.uk", - "hg@magic.uk", - "test@hogwart.com", "test2@magic.uk", + "test@hogwart.com", ], ) @@ -409,6 +409,6 @@ def test_drop_empty_contacts(self): ) ctx = a.get_additional_context(objects=dict(event=e)) - expected = ["rw@magic.uk", "hg@magic.uk"] + expected = ["hg@magic.uk", "rw@magic.uk"] self.assertEqual(ctx["all_emails"], expected) self.assertEqual(a.all_recipients(), "rw@magic.uk, hg@magic.uk") diff --git a/amy/dashboard/forms.py b/amy/dashboard/forms.py index 2ce25dafe..e31144151 100644 --- a/amy/dashboard/forms.py +++ b/amy/dashboard/forms.py @@ -84,6 +84,7 @@ class Meta: "airport", "github", "twitter", + "bluesky", "url", "username", "affiliation", diff --git a/amy/dashboard/tests/test_autoupdate_profile.py b/amy/dashboard/tests/test_autoupdate_profile.py index e520cee33..5c8e6c15d 100644 --- a/amy/dashboard/tests/test_autoupdate_profile.py +++ b/amy/dashboard/tests/test_autoupdate_profile.py @@ -62,6 +62,7 @@ def test_update_profile(self): "airport": self.airport_0_0.pk, "github": "changed", "twitter": "", + "bluesky": "", "url": "", "username": "changed", "affiliation": "", diff --git a/amy/emails/tests/actions/test_ask_for_website_cancel_receiver.py b/amy/emails/tests/actions/test_ask_for_website_cancel_receiver.py index c82fbb16a..95b5064af 100644 --- a/amy/emails/tests/actions/test_ask_for_website_cancel_receiver.py +++ b/amy/emails/tests/actions/test_ask_for_website_cancel_receiver.py @@ -235,6 +235,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", diff --git a/amy/emails/tests/actions/test_ask_for_website_receiver.py b/amy/emails/tests/actions/test_ask_for_website_receiver.py index 7cf7e2832..1ac88af7e 100644 --- a/amy/emails/tests/actions/test_ask_for_website_receiver.py +++ b/amy/emails/tests/actions/test_ask_for_website_receiver.py @@ -223,6 +223,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -240,6 +241,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_ask_for_website_update_receiver.py b/amy/emails/tests/actions/test_ask_for_website_update_receiver.py index 02bca334a..dceb7f584 100644 --- a/amy/emails/tests/actions/test_ask_for_website_update_receiver.py +++ b/amy/emails/tests/actions/test_ask_for_website_update_receiver.py @@ -315,6 +315,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", diff --git a/amy/emails/tests/actions/test_host_instructors_introduction_cancel_receiver.py b/amy/emails/tests/actions/test_host_instructors_introduction_cancel_receiver.py index 812f10276..1dbaae463 100644 --- a/amy/emails/tests/actions/test_host_instructors_introduction_cancel_receiver.py +++ b/amy/emails/tests/actions/test_host_instructors_introduction_cancel_receiver.py @@ -255,6 +255,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -272,6 +273,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_host_instructors_introduction_receiver.py b/amy/emails/tests/actions/test_host_instructors_introduction_receiver.py index b507a5844..0ecf2d1d0 100644 --- a/amy/emails/tests/actions/test_host_instructors_introduction_receiver.py +++ b/amy/emails/tests/actions/test_host_instructors_introduction_receiver.py @@ -253,6 +253,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -270,6 +271,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_host_instructors_introduction_update_receiver.py b/amy/emails/tests/actions/test_host_instructors_introduction_update_receiver.py index 374dd8037..2d96bb474 100644 --- a/amy/emails/tests/actions/test_host_instructors_introduction_update_receiver.py +++ b/amy/emails/tests/actions/test_host_instructors_introduction_update_receiver.py @@ -348,6 +348,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -365,6 +366,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_instructor_badge_awarded_cancel_receiver.py b/amy/emails/tests/actions/test_instructor_badge_awarded_cancel_receiver.py index 218cfea10..1d5450018 100644 --- a/amy/emails/tests/actions/test_instructor_badge_awarded_cancel_receiver.py +++ b/amy/emails/tests/actions/test_instructor_badge_awarded_cancel_receiver.py @@ -207,6 +207,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", diff --git a/amy/emails/tests/actions/test_instructor_badge_awarded_receiver.py b/amy/emails/tests/actions/test_instructor_badge_awarded_receiver.py index 9b2707327..87c983197 100644 --- a/amy/emails/tests/actions/test_instructor_badge_awarded_receiver.py +++ b/amy/emails/tests/actions/test_instructor_badge_awarded_receiver.py @@ -190,6 +190,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", diff --git a/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_cancel_receiver.py b/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_cancel_receiver.py index f104b22e0..6423f7f71 100644 --- a/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_cancel_receiver.py +++ b/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_cancel_receiver.py @@ -251,6 +251,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="", twitter="", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", diff --git a/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_update_receiver.py b/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_update_receiver.py index 89eb8d627..5f7775940 100644 --- a/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_update_receiver.py +++ b/amy/emails/tests/actions/test_instructor_confirmed_for_workshop_update_receiver.py @@ -339,6 +339,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="", twitter="", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", diff --git a/amy/emails/tests/actions/test_instructor_training_approaching_cancel_receiver.py b/amy/emails/tests/actions/test_instructor_training_approaching_cancel_receiver.py index c6ae13e14..39e578a34 100644 --- a/amy/emails/tests/actions/test_instructor_training_approaching_cancel_receiver.py +++ b/amy/emails/tests/actions/test_instructor_training_approaching_cancel_receiver.py @@ -250,6 +250,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -267,6 +268,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_instructor_training_approaching_receiver.py b/amy/emails/tests/actions/test_instructor_training_approaching_receiver.py index 7789a3c3d..610153726 100644 --- a/amy/emails/tests/actions/test_instructor_training_approaching_receiver.py +++ b/amy/emails/tests/actions/test_instructor_training_approaching_receiver.py @@ -244,6 +244,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -261,6 +262,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_instructor_training_approaching_update_receiver.py b/amy/emails/tests/actions/test_instructor_training_approaching_update_receiver.py index efe1517d7..828fe15f3 100644 --- a/amy/emails/tests/actions/test_instructor_training_approaching_update_receiver.py +++ b/amy/emails/tests/actions/test_instructor_training_approaching_update_receiver.py @@ -332,6 +332,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -349,6 +350,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_instructor_training_completed_not_badged_integration.py b/amy/emails/tests/actions/test_instructor_training_completed_not_badged_integration.py index 2ed3a80ab..d84e26615 100644 --- a/amy/emails/tests/actions/test_instructor_training_completed_not_badged_integration.py +++ b/amy/emails/tests/actions/test_instructor_training_completed_not_badged_integration.py @@ -70,6 +70,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -141,6 +142,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -240,6 +242,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", diff --git a/amy/emails/tests/actions/test_persons_merged.py b/amy/emails/tests/actions/test_persons_merged.py index cf737e8e8..17c5ca768 100644 --- a/amy/emails/tests/actions/test_persons_merged.py +++ b/amy/emails/tests/actions/test_persons_merged.py @@ -180,6 +180,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -197,6 +198,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", @@ -218,6 +220,7 @@ def test_integration(self) -> None: "airport": "obj_a", "github": "obj_b", "twitter": "obj_a", + "bluesky": "obj_a", "url": "obj_b", "affiliation": "obj_b", "occupation": "obj_a", diff --git a/amy/emails/tests/actions/test_post_workshop_7days_cancel_receiver.py b/amy/emails/tests/actions/test_post_workshop_7days_cancel_receiver.py index 6c832fd0f..d17041a12 100644 --- a/amy/emails/tests/actions/test_post_workshop_7days_cancel_receiver.py +++ b/amy/emails/tests/actions/test_post_workshop_7days_cancel_receiver.py @@ -246,6 +246,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -263,6 +264,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_post_workshop_7days_receiver.py b/amy/emails/tests/actions/test_post_workshop_7days_receiver.py index ae8c62594..3f5a3fb77 100644 --- a/amy/emails/tests/actions/test_post_workshop_7days_receiver.py +++ b/amy/emails/tests/actions/test_post_workshop_7days_receiver.py @@ -239,6 +239,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -256,6 +257,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_post_workshop_7days_update_receiver.py b/amy/emails/tests/actions/test_post_workshop_7days_update_receiver.py index 282412392..0ef1c58b0 100644 --- a/amy/emails/tests/actions/test_post_workshop_7days_update_receiver.py +++ b/amy/emails/tests/actions/test_post_workshop_7days_update_receiver.py @@ -334,6 +334,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -351,6 +352,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_recruit_helpers_cancel_receiver.py b/amy/emails/tests/actions/test_recruit_helpers_cancel_receiver.py index 66dd21485..c3af005fb 100644 --- a/amy/emails/tests/actions/test_recruit_helpers_cancel_receiver.py +++ b/amy/emails/tests/actions/test_recruit_helpers_cancel_receiver.py @@ -242,6 +242,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -259,6 +260,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_recruit_helpers_receiver.py b/amy/emails/tests/actions/test_recruit_helpers_receiver.py index d5d16b962..8977f6068 100644 --- a/amy/emails/tests/actions/test_recruit_helpers_receiver.py +++ b/amy/emails/tests/actions/test_recruit_helpers_receiver.py @@ -235,6 +235,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -252,6 +253,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/emails/tests/actions/test_recruit_helpers_update_receiver.py b/amy/emails/tests/actions/test_recruit_helpers_update_receiver.py index a4378697f..1dc3d3d17 100644 --- a/amy/emails/tests/actions/test_recruit_helpers_update_receiver.py +++ b/amy/emails/tests/actions/test_recruit_helpers_update_receiver.py @@ -327,6 +327,7 @@ def test_integration(self) -> None: airport=self.airport_0_0, github="purdy_kelsi", twitter="purdy_kelsi", + bluesky="@purdy_kelsi.bsky.social", url="http://kelsipurdy.com/", affiliation="University of Arizona", occupation="TA at Biology Department", @@ -344,6 +345,7 @@ def test_integration(self) -> None: airport=self.airport_0_50, github="deckow_jayden", twitter="deckow_jayden", + bluesky="@deckow_jayden.bsky.social", url="http://jaydendeckow.com/", affiliation="UFlo", occupation="Staff", diff --git a/amy/templates/workshops/persons_merge.html b/amy/templates/workshops/persons_merge.html index f91a354b4..389ea5303 100644 --- a/amy/templates/workshops/persons_merge.html +++ b/amy/templates/workshops/persons_merge.html @@ -77,6 +77,11 @@