fixed bug regarding delta to int, must be delta.days.. bug needs still to be fixed in automated roomupdate section

This commit is contained in:
alpcentaur 2024-01-23 15:47:08 +01:00
parent d5c2c941e0
commit 157cab2910
4 changed files with 11 additions and 6 deletions

View file

@ -546,16 +546,17 @@ if __name__ == '__main__':
for i in eval(iteration_var_list):
try:
print(room_fdb, i)
print('oioioioioiOIOIOI')
for key in data[room_fdb][i]:
contains_tag = False
period_data_formatted = dateutil.parser.parse(data[room_fdb][i][key]["period"])
name_data_lower = [word.lower() for word in data[room_fdb][i][key]["name"].split(' ')]
info_data_lower = [word.lower() for word in data[room_fdb][i][key]["info"].split(' ')]
text_data_lower = [word.lower() for word in data[room_fdb][i][key]["text"].split(' ')]
print('got until ONE')
tag_list = []
for tag in eval(room_tags):
print('got until TWO')
if '_' in tag:
ntags = tag.split('_')
ntags_length = len(ntags)
@ -630,7 +631,7 @@ if __name__ == '__main__':
if tword_contains_tag == True:
contains_tag = True
tag_list.append(tag + ' in text')
print('got until THREE')
if contains_tag == True:
#print('------------------')
#print(name_data_lower, info_data_lower, text_data_lower)
@ -656,8 +657,8 @@ if __name__ == '__main__':
now_formatted = dateutil.parser.parse(str(now))
delta = period_data_formatted - now_formatted
if message_was_already_there == False and delta < int(room_deadline_days):
print('delta', delta, int(delta.days))
if message_was_already_there == False and int(delta.days) < int(room_deadline_days):

View file

@ -1 +1 @@
printrooms§%§%oJ4yxBgLbGg7S5LdR
updaterooms 65afc67d7954218b50162c22§%§%kr2Qt7t4a3dNCDYqm

View file

@ -0,0 +1,4 @@
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYYRY1F02T06C/de/overview?70|81302152-Conseil et soutien sur la promotion de la participation sociale et politique dans les communes partenaires à Madagascar>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1FMBKJ8D/de/overview?79|81303550-Backstopper*in zur Förderung der Sozialen Kohäsion und Interessensvertretung von Frauenorganisationen im Ostsudan>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1FYLRQ0V/de/overview?83|81301916a-Endline Surveys of the SUN Global Programme>
<https://ausschreibungen.giz.de/Satellite/public/company/project/CXTRYY6Y1FYYC41G/de/overview?87|81303178 - Regional Guidelines on Mineral Beneficiation>