Merge pull request #6 from aiulian25/copilot/file-upload-device-camera
Fix missing document_path support in fuel and service record mutations
This commit is contained in:
commit
a620d42ed8
1 changed files with 3 additions and 1 deletions
|
|
@ -576,7 +576,8 @@ def fuel_records(vehicle_id):
|
|||
distance=distance,
|
||||
fuel_economy=fuel_economy,
|
||||
unit=data.get('unit', 'MPG'),
|
||||
notes=data.get('notes')
|
||||
notes=data.get('notes'),
|
||||
document_path=data.get('document_path')
|
||||
)
|
||||
db.session.add(record)
|
||||
db.session.commit()
|
||||
|
|
@ -865,6 +866,7 @@ def service_record_operations(vehicle_id, record_id):
|
|||
record.category = data.get('category', record.category)
|
||||
record.cost = data.get('cost', record.cost)
|
||||
record.notes = data.get('notes', record.notes)
|
||||
record.document_path = data.get('document_path', record.document_path)
|
||||
db.session.commit()
|
||||
return jsonify({'message': 'Service record updated successfully'})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue