Skip to content

Commit 6c3ed54

Browse files
author
Matt Sokoloff
committed
minor changes
1 parent 7863082 commit 6c3ed54

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

labelbox/orm/db_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ def __call__(self, *args, **kwargs):
118118
""" Forwards the call to either `_to_many` or `_to_one` methods,
119119
depending on relationship type. """
120120

121-
if self.relationship.deprecation_message:
122-
logger.warning(self.relationship.deprecation_message)
121+
if self.relationship.deprecation_warning:
122+
logger.warning(self.relationship.deprecation_warning)
123123

124124
if self.relationship.relationship_type == Relationship.Type.ToMany:
125125
return self._to_many(*args, **kwargs)

labelbox/orm/model.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ class Relationship:
187187
cache (bool) : Whether or not to cache the relationship values.
188188
Useful for objects that aren't directly queryable from the api (relationship query builder won't work)
189189
Also useful for expensive ToOne relationships
190+
deprecation_warning (string) optional message to display when RelationshipManager is called
190191
191192
"""
192193

@@ -209,12 +210,12 @@ def __init__(self,
209210
name=None,
210211
graphql_name=None,
211212
cache=False,
212-
deprecation_message=None):
213+
deprecation_warning=None):
213214
self.relationship_type = relationship_type
214215
self.destination_type_name = destination_type_name
215216
self.filter_deleted = filter_deleted
216217
self.cache = cache
217-
self.deprecation_message = deprecation_message
218+
self.deprecation_warning = deprecation_warning
218219

219220
if name is None:
220221
name = utils.snake_case(destination_type_name) + (

tests/integration/test_asset_metadata.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ def test_asset_metadata_crud(project, dataset):
3737
"Relationship DataRow.metadata doesn't support sorting"
3838

3939

40-
4140
def test_asset_attachment_crud(project, dataset):
4241
# must attach a dataset to a project before it can be queryable
4342
# due to permissions

0 commit comments

Comments
 (0)