Updated Service.version and Version.vcl to use new Model.create
Added convenience methods to Service for fetching details and active version number
Bug fixes:
Compare attrs and _original_attrs before saving. (Without this check, calling .save() on an instance without changed attributes makes a PUT call with no data. Then instance.attrs is set to the error response for an incomplete API call, e.g. {"msg": "Missing parameter", "detail": "param is missing or the value is empty: item_value"})
Additions:
create
anddelete
methods toModel
baseService.version
andVersion.vcl
to use newModel.create
Service
for fetching details and active version numberBug fixes:
attrs
and_original_attrs
before saving. (Without this check, calling.save()
on an instance without changed attributes makes aPUT
call with no data. Theninstance.attrs
is set to the error response for an incomplete API call, e.g.{"msg": "Missing parameter", "detail": "param is missing or the value is empty: item_value"}
)VCL
import tofastly.py