--- **[tickets:#8571] merge request error on can_merge_cache_key** **Status:** open **Milestone:** unreleased **Created:** Thu Dec 12, 2024 02:54 PM UTC by Dave Brondsema **Last Updated:** Thu Dec 12, 2024 02:54 PM UTC **Owner:** nobody If a repo's branches are stale (needs a "refresh"), or the merge request refers to a branch that no longer exists then we get this error: ``` File '/var/local/allura/Allura/allura/controllers/repository.py', line 434 in index can_merge=self.req.can_merge(), File '/var/local/allura/Allura/allura/model/repository.py', line 964 in can_merge cached = self.get_can_merge_cache() File '/var/local/allura/Allura/allura/model/repository.py', line 943 in get_can_merge_cache key = self.can_merge_cache_key() File '/var/local/allura/Allura/allura/model/repository.py', line 937 in can_merge_cache_key target_hash = self.app.repo.commit(self.target_branch)._id AttributeError: 'NoneType' object has no attribute '_id' ``` Can we avoid this error, and instead show a message on the page? (might even show a message already if we can get past this error) --- Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/ To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.