Skip to content

Commit 43a47ea

Browse files
Fixes string representation of MedibaseMedicine model (#1452)
* fix repr of `MedibaseMedicine` * improve string repr * make it prettier :)
1 parent 2933234 commit 43a47ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

care/facility/models/prescription.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class MedibaseMedicine(BaseModel):
6464
atc_classification = models.TextField(blank=True, null=True)
6565

6666
def __str__(self):
67-
return " - ".join([self.name, self.generic, self.company])
67+
return " - ".join(filter(None, [self.name, self.generic, self.company]))
6868

6969

7070
class Prescription(BaseModel):

0 commit comments

Comments
 (0)