threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

Minio chat flow, error after the first pane #609

Closed zaibon closed 4 years ago

zaibon commented 4 years ago
JSX> Mon 27 07:10:19 lows/minio_deploy.py -  21 - chat                               : EXCEPTION: 
    AttributeError("'Network' object has no attribute 'currency'")
--TRACEBACK------------------
/sandbox/lib/jumpscale/Jumpscale/servers/gedis/GedisChatBot.py in wrapper
    189    self.topic_method(bot=self)
/sandbox/code/github/threefoldtech/jumpscaleX_threebot/ThreeBotPackages/tfgrid_solutions/tfgrid_solu
tions/chatflows/minio_deploy.py in chat
    21    currency = network.currency
-----------------------------

My network was crearted quite some time ago, so the currency field does not exists on it yet

ranatrk commented 4 years ago

@zaibon the code associated with this change is in jumpscaleX_libs. Can you try and pull the changes there as well then try again? reference: https://github.com/threefoldtech/jumpscaleX_libs/blob/development/JumpscaleLibs/sal/reservation_chatflow/reservation_chatflow.py#L23

grimpy commented 4 years ago

failedpay @ranatrk old reservations have empty curecny, in such a case please fall back to the original logic of checking the node type of the network

ranatrk commented 4 years ago

I adjusted getting the currency so be the value of currencies[0], if empty will get from the node of the network if its free_to_use then use FreeTFT, otherwise use the currency 'TFT' https://github.com/threefoldtech/jumpscaleX_libs/commit/e284167a636b83c3822b51384deae0a23d270175

AhmedHanafy725 commented 4 years ago

Verified I had this network before applying payment on testnet which this network has no currency attr, so it uses FreeTFT for this network.

image