fau-fablab / FabLabKasse

FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops
https://fablabkasse.readthedocs.io
GNU General Public License v3.0
15 stars 4 forks source link

FIX UTF8 handling in `kassenbuch client create` #142

Closed mgmax closed 8 years ago

codecov-io commented 8 years ago

Current coverage is 28.19% (diff: 0.00%)

Merging #142 into development will not change coverage

@@           development       #142   diff @@
=============================================
  Files               54         54          
  Lines             6774       6774          
  Methods              0          0          
  Messages             0          0          
  Branches             0          0          
=============================================
  Hits              1910       1910          
  Misses            4864       4864          
  Partials             0          0          

Powered by Codecov. Last update 2017193...60aa3f2

patkan commented 8 years ago

I just tested your branch with the conflicting data from the mail thread (it contained umlauts in the comment). development crashes with the data and this branch creates the entry. I have tested client list and client show, both work still after the fix :-) The entry in the database looks good and both umlauts in address and comment do work now (and failed in development) Booking onto the customer in the GUI works too.

Concerning my first comment about the empty string that should be unicode: I had a look at the code. Since the string gets inserted into a unicode-string with format it is irrelevant whether the empty string is unicode or not. For completeness I would be happy, if you could change the second string to unicode.

[pseudo-patch]
-                default_str = u" [{0}]".format(unicode(default_input)) if default_input is not None else ""
+                default_str = u" [{0}]".format(unicode(default_input)) if default_input is not None else u""

Apart from that I would say this fix is ready to merge.

mgmax commented 8 years ago

Feel free to edit and merge :-)

patkan commented 8 years ago

merged ;-)

patkan commented 8 years ago

(and deployed)