Unverified Commit 96669b61 authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #7 from TLasguignes/master

Offices - last contribution
parents a7450abf 780fafe3
...@@ -7,14 +7,6 @@ ...@@ -7,14 +7,6 @@
[ [
"Fourmy", "Fourmy",
"Médéric" "Médéric"
],
[
"Nicolin",
"Alexis"
],
[
"Ramuzat",
"Noelie"
] ]
], ],
"B185": [ "B185": [
...@@ -99,8 +91,14 @@ ...@@ -99,8 +91,14 @@
"Côme" "Côme"
], ],
[ [
"Romualdi", "Smaldone",
"Giulio" "Filippo Maria"
]
],
"B68": [
[
"Deves",
"Mathieu"
] ]
], ],
"B69.1": [ "B69.1": [
...@@ -110,10 +108,6 @@ ...@@ -110,10 +108,6 @@
] ]
], ],
"B69.2": [ "B69.2": [
[
"Ha",
"Thuc Long"
],
[ [
"Kleff", "Kleff",
"Sébastien" "Sébastien"
...@@ -140,9 +134,23 @@ ...@@ -140,9 +134,23 @@
"Lamiraux", "Lamiraux",
"Florent" "Florent"
], ],
[
"Le",
"Quang Anh"
],
[ [
"Mansard", "Mansard",
"Nicolas" "Nicolas"
] ]
],
"BSalleGerardBauzil": [
[
"Depledt",
"Yann"
],
[
"Nguyen",
"Dinh Vinh Thanh"
]
] ]
} }
\ No newline at end of file
...@@ -84,18 +84,20 @@ class Offices: ...@@ -84,18 +84,20 @@ class Offices:
# Stuff that is wrong in LDAP… We should fix that there # Stuff that is wrong in LDAP… We should fix that there
WRONG_OFFICE = { WRONG_OFFICE = {
'Exterieur': {('Steve', 'Tonneau'), ('Nils', 'Hareng')}, 'Exterieur': {('Nils', 'Hareng')},
'BSalleGerardBauzil': {('Quang Anh', 'Le')},
'B69.1': {('Guilhem', 'Saurel'), ('Pierre', 'Fernbach')}, 'B69.1': {('Guilhem', 'Saurel'), ('Pierre', 'Fernbach')},
'B90': {('Nicolas', 'Mansard')}, 'B90': {('Nicolas', 'Mansard')},
'B69.2': {('D. V. Thanh', 'Nguyen')}, 'B69.2': {('Dinh Vinh Thanh', 'Nguyen'), ('Filip', 'Becanovic')},
} }
WRONG_OFFICE = {k: {Gepettist(sn, gn) for (gn, sn) in v} for k, v in WRONG_OFFICE.items()} WRONG_OFFICE = {k: {Gepettist(sn, gn) for (gn, sn) in v} for k, v in WRONG_OFFICE.items()}
# Fix unicode from LDAP data… # Fix unicode from LDAP data…
ALIAS = { ALIAS = {
'B67': ({Gepettist('Leziart', 'Pierre-Alexandre')}, {Gepettist('Léziart', 'P-A')}), 'B67': [({Gepettist('Leziart', 'Pierre-Alexandre')}, {Gepettist('Léziart', 'P-A')}),
'B61a': ({Gepettist('Taix', 'Michel')}, {Gepettist('Taïx', 'Michel')}), ({Gepettist('Smaldone', 'Filippo Maria')}, {Gepettist('Smaldone', 'Filippo M.')})],
'B91': ({Gepettist('Soueres', 'Philippe')}, {Gepettist('Souères', 'Philippe')}), 'B61a': [({Gepettist('Taix', 'Michel')}, {Gepettist('Taïx', 'Michel')})],
'B181': ({Gepettist('Ramuzat', 'Noelie')}, {Gepettist('Ramuzat', 'Noëlie')}), 'B91': [({Gepettist('Soueres', 'Philippe')}, {Gepettist('Souères', 'Philippe')})],
'B69.2': [({Gepettist('Nguyen', 'Dinh Vinh Thanh')}, {Gepettist('Nguyen', 'D. V. T.')})],
} }
...@@ -143,8 +145,9 @@ def fix_wrong_offices(offices): ...@@ -143,8 +145,9 @@ def fix_wrong_offices(offices):
for wrong_office in offices: for wrong_office in offices:
if wrong_office != woffice: if wrong_office != woffice:
offices[wrong_office] -= wmembers # remove them from the other offices offices[wrong_office] -= wmembers # remove them from the other offices
for office, (before, after) in ALIAS.items(): for office, aliases in ALIAS.items():
offices[office] = offices[office] - before | after for before, after in aliases:
offices[office] = offices[office] - before | after
return offices return offices
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment