Skip to content

Commit 9b8b2cf

Browse files
committed
[DOP-28706] Make DTO merging case-insensitive
1 parent a6bb651 commit 9b8b2cf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

data_rentgen/dto/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class DatasetDTO:
1616

1717
@property
1818
def unique_key(self) -> tuple:
19-
return (self.location.unique_key, self.name)
19+
return (self.location.unique_key, self.name.lower())
2020

2121
def merge(self, new: DatasetDTO) -> DatasetDTO:
2222
self.location.merge(new.location)

data_rentgen/dto/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class JobDTO:
1818

1919
@property
2020
def unique_key(self) -> tuple:
21-
return (self.location.unique_key, self.name)
21+
return (self.location.unique_key, self.name.lower())
2222

2323
def merge(self, new: JobDTO) -> JobDTO:
2424
self.id = new.id or self.id

data_rentgen/dto/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class UserDTO:
1313

1414
@property
1515
def unique_key(self) -> tuple:
16-
return (self.name,)
16+
return (self.name.lower(),)
1717

1818
def merge(self, new: UserDTO) -> UserDTO:
1919
self.id = new.id or self.id

0 commit comments

Comments
 (0)