lib/pact_broker/domain/pacticipant.rb in pact_broker-2.65.0 vs lib/pact_broker/domain/pacticipant.rb in pact_broker-2.66.0
- old
+ new
@@ -28,9 +28,13 @@
join(:labels, {pacticipant_id: :id}).where(filter)
end
end
def before_destroy
+ PactBroker::Pacts::PactPublication.where(provider: self).delete
+ PactBroker::Domain::Verification.where(consumer: self).or(provider: self).delete
+ PactBroker::Domain::Version.where(pacticipant: self).delete
+ PactBroker::Pacts::PactVersion.where(consumer: self).or(provider: self).delete
PactBroker::Domain::Label.where(pacticipant: self).destroy
super
end
def latest_version