diff --git a/lib/pact_broker/versions/branch_version.rb b/lib/pact_broker/versions/branch_version.rb index a1febb4e9..797c4851f 100644 --- a/lib/pact_broker/versions/branch_version.rb +++ b/lib/pact_broker/versions/branch_version.rb @@ -27,7 +27,8 @@ def before_save end def latest? - branch_head.branch_version_id == id + # Should not be possible, not to have a branch head, but have seen this error in the logs + branch_head&.branch_version_id == id end def version_number