cotisation : correction noms avec apostrophes (corrige #3)
This commit is contained in:
parent
52ffe2505a
commit
fe1398ac7a
|
@ -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"],
|
||||
|
|
Loading…
Reference in New Issue