They will have the same result, since both treat self.getData()'s result in a boolean context, but beware:
1) return self.getData() if self.getData() else ''
will run the function getData twice, while
2) return self.getData() or ''
will only run it once. This can be important if getData() takes a while to execute, and it means that 1) is not the same as 2) if the function getData() has any side effects.
Stick with 2)