DRY version of this one line if/else for property's existence
You can use

my_object.unique_id = my_object.unique_id or 'TBC'


Otherwise, stop worrying about having to repeat a variable name, which is not what people typically mean when they talk about DRY. Variable names are often repeated when you do in-place manipulation of a variable, because you are saying "do something to x and then store the result as x".

If you have lots of similar lines of code then you could submit some more of your code for review; there may be other ways to simplify.