lib/fog/aws/models/cdn/invalidation.rb in fog-1.8.0 vs lib/fog/aws/models/cdn/invalidation.rb in fog-1.9.0
- old
+ new
@@ -27,11 +27,11 @@
status == 'Completed'
end
def save
requires :paths, :caller_reference
- raise "Submitted invalidation cannot be submitted again" if identity
- response = connection.post_invalidation(distribution.identity, paths, caller_reference)
+ raise "Submitted invalidation cannot be submitted again" if persisted?
+ response = service.post_invalidation(distribution.identity, paths, caller_reference)
merge_attributes(invalidation_to_attributes(response.body))
true
end
def destroy