1
0
Fork 0

Compare commits

..

No commits in common. "ba1f180c834e1b84d33e565abc3d95f772e2cdd8" and "61845678c49f4ecc6b4c4a6198af6fe9037987cf" have entirely different histories.

6 changed files with 6 additions and 13 deletions

View file

@ -15,7 +15,7 @@ on:
jobs:
lint:
name: Lint with stylelint and ESLint.
runs-on: ubuntu-24.04
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.

View file

@ -10,7 +10,7 @@ on:
jobs:
lint:
name: Lint with Prettier
runs-on: ubuntu-24.04
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.

View file

@ -222,10 +222,9 @@ class Connector(AbstractConnector):
def get_description(self, links: JsonDict) -> str:
"""grab an extracted excerpt from wikipedia"""
link = links.get("enwiki")
if not link or not link.get("title"):
if not link:
return ""
title = link.get("title")
url = f"{self.base_url}/api/data?action=wp-extract&lang=en&title={title}"
url = f"{self.base_url}/api/data?action=wp-extract&lang=en&title={link}"
try:
data = get_data(url)
except ConnectorException:

View file

@ -64,10 +64,6 @@ class InviteRequestForm(CustomForm):
if email and models.User.objects.filter(email=email).exists():
self.add_error("email", _("A user with this email already exists."))
email_domain = email.split("@")[-1]
if email and models.EmailBlocklist.objects.filter(domain=email_domain).exists():
self.add_error("email", _("This email address cannot be registered."))
class Meta:
model = models.InviteRequest
fields = ["email", "answer"]

View file

@ -273,9 +273,7 @@ class Inventaire(TestCase):
json={"extract": "hi hi"},
)
extract = self.connector.get_description(
{"enwiki": {"title": "test_path", "badges": "hello"}}
)
extract = self.connector.get_description({"enwiki": "test_path"})
self.assertEqual(extract, "hi hi")
def test_remote_id_from_model(self):

View file

@ -4,7 +4,7 @@ boto3==1.34.74
bw-file-resubmit==0.6.0rc2
celery==5.3.6
colorthief==0.2.1
Django==4.2.18
Django==4.2.16
django-celery-beat==2.6.0
django-compressor==4.4
django-csp==3.8