Skip to content

Commit

Permalink
Allow ampersands as delimiter when importing teams.
Browse files Browse the repository at this point in the history
  • Loading branch information
Xausdorf committed Nov 5, 2024
1 parent 228b5b6 commit 4f2972e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tabbycat/importer/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class TeamDetailsForm(BaseInstitutionObjectDetailsForm):
"""Adds provision for a textarea input for speakers."""

# widgets are set in form constructor
speakers = forms.CharField(required=True, label=_("Speakers' names"), help_text=_("Can be separated by newlines, tabs or commas"))
speakers = forms.CharField(required=True, label=_("Speakers' names"), help_text=_("Can be separated by newlines, tabs, commas or ampersands"))
emails = forms.CharField(required=False, label=_("Speakers' email addresses"),
help_text=_("Optional, useful to include if distributing private URLs, list in same order as speakers' names"))
short_reference = forms.CharField(widget=forms.HiddenInput, required=False) # doesn't actually do anything, just placeholder to avoid validation failure
Expand Down Expand Up @@ -249,7 +249,7 @@ def __init__(self, tournament, *args, **kwargs):
@staticmethod
def _split_lines(data):
"""Split into list of names or emails; removing blank lines."""
items = data.replace('\t', '\n').replace(',', '\n')
items = data.replace('\t', '\n').replace(',', '\n').replace('&', '\n')
items = items.split('\n')
items = [item.strip() for item in items]
items = [item for item in items if item]
Expand Down

0 comments on commit 4f2972e

Please sign in to comment.