irc.libera.chat #tryton log beginning Mon Feb 6 12:10:01 AM CET 2023 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:19 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 23:19 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:db7c:11fb:1fc6:3112) has joined #tryton | 06:13 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:db7c:11fb:1fc6:3112) has joined #tryton | 06:24 | |
-!- tbruyere(~Thunderbi@mail.saluc.com) has joined #tryton | 07:22 | |
-!- acaubet(~Thunderbi@147.161.95.174) has joined #tryton | 07:48 | |
-!- rpit(~rpit@p200300c88f161d00165b2c8ab9392335.dip0.t-ipconnect.de) has joined #tryton | 08:01 | |
-!- tbruyere(~Thunderbi@mail.saluc.com) has joined #tryton | 08:18 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:42 | |
-!- ChanServ changed mode/#tryton -> +o cedk | 08:42 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton | 09:48 | |
-!- tbruyere1(~Thunderbi@mail.saluc.com) has joined #tryton | 12:05 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:18c2:1aff:fef9:2b7f) has joined #tryton | 12:14 | |
-!- htgoebel(~hartmut@p200300d5df180e00652d57540d04946c.dip0.t-ipconnect.de) has joined #tryton | 12:22 | |
htgoebel | Hello | 12:23 |
---|---|---|
htgoebel | what is the trick for chatching ValidationErrors in proteus without imorting trytond? | 12:23 |
nicoe | htgoebel: what are you trying to do? | 12:30 |
htgoebel | nicoe: I try to create data and if a ValitaionError occurs, I want to handle this | 12:35 |
htgoebel | nicoe: When importing trytond.model.modelstorage at module level, this tries to connect to the database before prorteus was configured. This I want to avoid importing trytond in my script at all | 12:38 |
nicoe | htgoebel: using "from trytond.model.modelstorage import ValidationError" shouldn't connect to the database | 12:44 |
htgoebel | nicoe: currious. It does not when only imorting it, but does when importing as part of my imported module | 12:50 |
htgoebel | nicoe: I need to digg deeper into this eventually. For now I just use a late umport as workaround | 12:51 |
cedk | normally there should be no connection if no transaction is started | 13:18 |
cedk | but if the backend is imported before proteus being configured, you can have the wrong backend | 13:19 |
cedk | any way I do not think proteus code should catch exception, it should support all cases before saving | 13:20 |
htgoebel | cedk: thx for the explanation. backend is imported before proteus being configured matches my case, | 13:35 |
htgoebel | cedk: I don't expect proteus to catch errors — me code needs to handle these in case of wrong input data | 13:36 |
-!- htgoebel(~hartmut@p200300d5df180e00652d57540d04946c.dip0.t-ipconnect.de) has left #tryton | 15:52 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 22:11 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!