cotisation : correction noms avec apostrophes (corrige #3)

This commit is contained in:
Adrien Bourmault 2023-11-04 15:19:21 +01:00
parent 52ffe2505a
commit fe1398ac7a
Signed by: neox
GPG Key ID: 2974E1D5F25DFCC8
1 changed files with 3 additions and 16 deletions

View File

@ -33,6 +33,7 @@ RECEPT_MAIL_ATTACHMENT="mail_recu_attachment.txt"
SUMMARY_MAIL="mail_recap_header.txt"
SENDMAIL_LOCATION = "/usr/sbin/sendmail" # sendmail location
BUF=[]
GITEA_URL = "https://forge.a-lec.org"
# gestion_read("SELECT * FROM services_users su \
# INNER JOIN membres m ON m.id = su.id_user \
@ -68,23 +69,9 @@ def gestion_read(req):
return response.json()
def git_mail_ticket_read(req):
response = requests.get('https://git.a-lec.org/api/v4/projects/46/issues',
headers={'PRIVATE-TOKEN' : git_get_secret()},
params = req)
response: requests.Response = requests.get('https://forge.a-lec.org/api/v1/repos/{}/{}/issues?access_token={}'.format("cominfra", "mail", git_get_secret()), params=req)
return response.json()
def git_xmpp_ticket_create(req):
response = requests.post('https://git.a-lec.org/api/v4/projects/44/issues',
headers={'PRIVATE-TOKEN' : git_get_secret()},
data = req)
return response.json()
def gestion_adduser(req):
response = requests.put('https://gestion.a-lec.org/api/user/import',
auth = HTTPBasicAuth('api666', gestion_get_secret()),
data = req)
return response.content
def setup_workdir():
if not os.path.isdir(WORKDIR):
os.mkdir(WORKDIR)
@ -357,7 +344,7 @@ def validate(member):
date = datetime.datetime.strptime(
answer["date"],'%Y-%m-%d').strftime("%d/%m/%Y")
filename = "{}_reçu_{}".format(
answer["nom"].replace(" ", "_"),
answer["nom"].replace(" ", "_").replace("'", "_"),
date.replace("/", "."))
BUF.append("* {} (numero {}), {}".format(answer["id"],