Compare commits

..

4 commits

Author SHA1 Message Date
iulian
32b0f8002d
Merge pull request #4 from aiulian25/copilot/update-docker-compose-file
Remove obsolete version field from docker-compose files
2025-11-12 22:35:40 +00:00
iulian
a620d42ed8
Merge pull request #6 from aiulian25/copilot/file-upload-device-camera
Fix missing document_path support in fuel and service record mutations
2025-11-12 22:34:01 +00:00
copilot-swe-agent[bot]
d1fd1fd762 Fix fuel records and service records to support document_path in POST/PUT
Co-authored-by: aiulian25 <17886483+aiulian25@users.noreply.github.com>
2025-11-12 22:20:32 +00:00
copilot-swe-agent[bot]
cbc2806f1b Initial plan 2025-11-12 22:15:31 +00:00

View file

@ -576,7 +576,8 @@ def fuel_records(vehicle_id):
distance=distance, distance=distance,
fuel_economy=fuel_economy, fuel_economy=fuel_economy,
unit=data.get('unit', 'MPG'), 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.add(record)
db.session.commit() db.session.commit()
@ -865,6 +866,7 @@ def service_record_operations(vehicle_id, record_id):
record.category = data.get('category', record.category) record.category = data.get('category', record.category)
record.cost = data.get('cost', record.cost) record.cost = data.get('cost', record.cost)
record.notes = data.get('notes', record.notes) record.notes = data.get('notes', record.notes)
record.document_path = data.get('document_path', record.document_path)
db.session.commit() db.session.commit()
return jsonify({'message': 'Service record updated successfully'}) return jsonify({'message': 'Service record updated successfully'})