Compare commits
11 commits
61845678c4
...
ba1f180c83
Author | SHA1 | Date | |
---|---|---|---|
ba1f180c83 | |||
![]() |
924f377e4e | ||
eef66b5fc4 | |||
4138a2b6aa | |||
03bab92ee6 | |||
d9d614b3bc | |||
609b7f58c8 | |||
3916666897 | |||
![]() |
305ef9195b | ||
de8ba3cf86 | |||
023e62294e |
6 changed files with 13 additions and 6 deletions
2
.github/workflows/lint-frontend.yaml
vendored
2
.github/workflows/lint-frontend.yaml
vendored
|
@ -15,7 +15,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint with stylelint and ESLint.
|
name: Lint with stylelint and ESLint.
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
|
||||||
|
|
2
.github/workflows/prettier.yaml
vendored
2
.github/workflows/prettier.yaml
vendored
|
@ -10,7 +10,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint with Prettier
|
name: Lint with Prettier
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
|
||||||
|
|
|
@ -222,9 +222,10 @@ class Connector(AbstractConnector):
|
||||||
def get_description(self, links: JsonDict) -> str:
|
def get_description(self, links: JsonDict) -> str:
|
||||||
"""grab an extracted excerpt from wikipedia"""
|
"""grab an extracted excerpt from wikipedia"""
|
||||||
link = links.get("enwiki")
|
link = links.get("enwiki")
|
||||||
if not link:
|
if not link or not link.get("title"):
|
||||||
return ""
|
return ""
|
||||||
url = f"{self.base_url}/api/data?action=wp-extract&lang=en&title={link}"
|
title = link.get("title")
|
||||||
|
url = f"{self.base_url}/api/data?action=wp-extract&lang=en&title={title}"
|
||||||
try:
|
try:
|
||||||
data = get_data(url)
|
data = get_data(url)
|
||||||
except ConnectorException:
|
except ConnectorException:
|
||||||
|
|
|
@ -64,6 +64,10 @@ class InviteRequestForm(CustomForm):
|
||||||
if email and models.User.objects.filter(email=email).exists():
|
if email and models.User.objects.filter(email=email).exists():
|
||||||
self.add_error("email", _("A user with this email already 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:
|
class Meta:
|
||||||
model = models.InviteRequest
|
model = models.InviteRequest
|
||||||
fields = ["email", "answer"]
|
fields = ["email", "answer"]
|
||||||
|
|
|
@ -273,7 +273,9 @@ class Inventaire(TestCase):
|
||||||
json={"extract": "hi hi"},
|
json={"extract": "hi hi"},
|
||||||
)
|
)
|
||||||
|
|
||||||
extract = self.connector.get_description({"enwiki": "test_path"})
|
extract = self.connector.get_description(
|
||||||
|
{"enwiki": {"title": "test_path", "badges": "hello"}}
|
||||||
|
)
|
||||||
self.assertEqual(extract, "hi hi")
|
self.assertEqual(extract, "hi hi")
|
||||||
|
|
||||||
def test_remote_id_from_model(self):
|
def test_remote_id_from_model(self):
|
||||||
|
|
|
@ -4,7 +4,7 @@ boto3==1.34.74
|
||||||
bw-file-resubmit==0.6.0rc2
|
bw-file-resubmit==0.6.0rc2
|
||||||
celery==5.3.6
|
celery==5.3.6
|
||||||
colorthief==0.2.1
|
colorthief==0.2.1
|
||||||
Django==4.2.16
|
Django==4.2.18
|
||||||
django-celery-beat==2.6.0
|
django-celery-beat==2.6.0
|
||||||
django-compressor==4.4
|
django-compressor==4.4
|
||||||
django-csp==3.8
|
django-csp==3.8
|
||||||
|
|
Loading…
Add table
Reference in a new issue