LI3DS / api-li3ds

LI³DS Rest API
GNU General Public License v3.0
0 stars 3 forks source link

Add default values to payloads #10

Closed ldgeo closed 7 years ago

ldgeo commented 7 years ago

when a key is missing from the payload the sql request should see a NULL value instead of throwing a KeyError

elemoine commented 7 years ago

Let me test it…

elemoine commented 7 years ago

Let me test it…

It kinda works. I removed validity_start and validity_end from the payload and the insertion of the transfo succeeded. But I have no validity dates for this transfo in the database, the default values that you added to the model did not apply. Is this expected?

ldgeo commented 7 years ago

@elemoine if you merge this : https://github.com/LI3DS/pg_li3ds/pull/1 you'll have a default value filled by pg

elemoine commented 7 years ago

@elemoine if you merge this : LI3DS/pg_li3ds#1 you'll have a default value filled by pg

In that case, don't we want to remove the default values set in Python?