googlefonts / django-robo-cjk

server-side engine :gear: based on python + django + MySQL of the robo-cjk plugin.
GNU General Public License v3.0
2 stars 2 forks source link

font_update(): not possible to set empty fontlib, features or designspace #153

Closed justvanrossum closed 10 months ago

justvanrossum commented 11 months ago

In the font_update() function, the if xxx: conditionals will evaluate to false for empty values, and will then not update the field. This makes it impossible to clear any of those fields.

I can't find the definition for get_dict(), so I don't know what it returns for a missing argument. There should be a distinction between "argument not given" and "argument is empty".

https://github.com/googlefonts/django-robo-cjk/blob/1db34842ae7e0dd6d850b39ce3c374c20c5b9d5d/robocjk/api/views.py#L224-L242

fabiocaccamo commented 10 months ago

@justvanrossum this should be fixed now.

justvanrossum commented 10 months ago

Thanks, I can confirm it is fixed!

fabiocaccamo commented 10 months ago

Shall we close this?

justvanrossum commented 10 months ago

Fixed by https://github.com/googlefonts/django-robo-cjk/commit/a4529a4566a888220d56ab89ffe94941d3684ec5