Bug #30011
action globale avec déclencheur sur un python datetime.date
Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
23 janvier 2019
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
Expression Python pour la date de déclenchement = « date(form_var_...) »
Exception: type = '<type 'exceptions.TypeError'>', value = 'can't compare datetime.datetime to datetime.date' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/wcs/workflows.py", line 1106, in must_trigger 1104 anchor_date = anchor_date + datetime.timedelta(days=int(self.timeout)) 1105 > 1106 return bool(datetime.datetime.now() > anchor_date) 1107 1108 @classmethod locals: anchor_date = datetime.date(2019, 1, 22)
Fichiers
Révisions associées
Historique
Mis à jour par Thomas Noël il y a plus de 5 ans
... 1080 # convert anchor_date to datetime.datetime() 1081 if isinstance(anchor_date, datetime.datetime): 1082 pass 1083 elif isinstance(anchor_date, datetime.date): 1084 pass 1085 elif isinstance(anchor_date, time.struct_time): ...
il manque une conversion en datetime.datetime ligne 1084.
Mis à jour par Thomas Noël il y a plus de 5 ans
- Fichier 0001-workflows-convert-date-to-datetime-in-anchor-express.patch 0001-workflows-convert-date-to-datetime-in-anchor-express.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Frédéric Péters il y a plus de 5 ans
- Statut changé de Solution proposée à Solution validée
Ack.
Mis à jour par Frédéric Péters il y a plus de 5 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit b9df0e468cae35cb22714e90820272fe26fd5877 Author: Thomas NOEL <tnoel@entrouvert.com> Date: Wed Jan 23 01:14:52 2019 +0100 workflows: convert date to datetime in anchor expression (#30011)
Mis à jour par Frédéric Péters il y a plus de 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
workflows: convert date to datetime in anchor expression (#30011)