Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
concrexit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
thalia
concrexit
Commits
14bd031a
Verified
Commit
14bd031a
authored
5 years ago
by
Sébastiaan Versteeg
Browse files
Options
Downloads
Patches
Plain Diff
Allow non-existing mailinglists to be created
parent
64edc048
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
website/mailinglists/gsuite.py
+6
-4
6 additions, 4 deletions
website/mailinglists/gsuite.py
website/mailinglists/models.py
+1
-1
1 addition, 1 deletion
website/mailinglists/models.py
with
7 additions
and
5 deletions
website/mailinglists/gsuite.py
+
6
−
4
View file @
14bd031a
...
...
@@ -23,7 +23,7 @@ class GSuiteSyncService:
self
.
name
=
name
self
.
description
=
description
self
.
aliases
=
aliases
self
.
addresses
=
addresses
self
.
addresses
=
sorted
(
set
(
addresses
))
def
__eq__
(
self
,
other
:
object
)
->
bool
:
if
isinstance
(
other
,
self
.
__class__
):
...
...
@@ -215,7 +215,7 @@ class GSuiteSyncService:
except
HttpError
as
e
:
logger
.
error
(
'
Could not obtain list member data
'
,
e
.
content
)
return
# the list does not exist or something else is wrong
new_members
=
set
(
group
.
addresses
)
new_members
=
group
.
addresses
remove_list
=
[
x
for
x
in
existing_members
if
x
not
in
new_members
]
insert_list
=
[
x
for
x
in
new_members
if
x
not
in
existing_members
...
...
@@ -253,8 +253,10 @@ class GSuiteSyncService:
moderated
=
mailinglist
.
moderated
,
name
=
mailinglist
.
name
,
description
=
mailinglist
.
description
,
aliases
=
[
x
.
alias
for
x
in
mailinglist
.
aliases
.
all
()],
addresses
=
list
(
mailinglist
.
all_addresses
())
aliases
=
([
x
.
alias
for
x
in
mailinglist
.
aliases
.
all
()]
if
mailinglist
.
pk
is
not
None
else
[]),
addresses
=
(
list
(
mailinglist
.
all_addresses
())
if
mailinglist
.
pk
is
not
None
else
[])
)
@staticmethod
...
...
This diff is collapsed.
Click to expand it.
website/mailinglists/models.py
+
1
−
1
View file @
14bd031a
...
...
@@ -79,7 +79,7 @@ class MailingList(models.Model):
yield
member
.
email
for
verbatimaddress
in
self
.
addresses
.
all
():
if
member
.
email
:
if
verbatimaddress
.
address
:
yield
verbatimaddress
.
address
def
clean
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment