Skip to content
Snippets Groups Projects
Verified Commit 9d9d3607 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Remove teckids.org addresses from all non-members.

parent 7f88831c
No related branches found
No related tags found
No related merge requests found
...@@ -231,6 +231,10 @@ class TeckidsPerson(ldapdb.models.Model, TeckidsLdapMixin): ...@@ -231,6 +231,10 @@ class TeckidsPerson(ldapdb.models.Model, TeckidsLdapMixin):
location = nominatim.geocode(self.homePostalAddress) location = nominatim.geocode(self.homePostalAddress)
self.latitude, self.longitude = location.latitude, location.longitude self.latitude, self.longitude = location.latitude, location.longitude
# Remove teckids.org addresses if not a member
if not self.is_member:
self.mail_addresses = [_ for _ in self.mail_addresses if not _.endswith('@teckids.org')]
super(TeckidsPerson, self).clean() super(TeckidsPerson, self).clean()
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment