I think it's more readable to use `'name': self.name or self.id` instead of the ternary test at 229 and a local variable.