SMEISEN/RidingCoachApp

PUT request improvement

Closed this issue · 0 comments

What is your request related to?

Improvement request

Please describe the request
Improve the PUT requests

Previous code

if inserted_data.get('module') is not None:
    sparepart.module = inserted_data.get('module')

New code

if inserted_data.get('min_stock', 'keyDoesNotExist') != 'keyDoesNotExist':
    sparepart.min_stock = inserted_data.get('min_stock')