Skip to content

Commit 454ae04

Browse files
rafacantonjvidalor
authored andcommitted
Add return
1 parent 5449430 commit 454ae04

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/ansys/dpf/core/property_field.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,22 +206,17 @@ def location(self, value):
206206
if meets_version(self._server.version, "11.0"):
207207
if self._field_definition:
208208
self._field_definition.location = value
209+
return
209210
else:
210211
raise Exception(
211212
"Property field location is based on field definition, and field definition is not defined"
212213
)
213214
elif self.scoping:
214215
self.scoping.location = value
216+
return
215217
else:
216218
raise Exception(
217-
"Property field location before v11.0 was based on scoping, and scoping is not defined"
218-
)
219-
220-
if self.scoping:
221-
self.scoping.location = value
222-
else:
223-
raise Exception(
224-
"Property field location is based on scoping, and scoping is not defined"
219+
"Property field location before is based on scoping, and scoping is not defined"
225220
)
226221

227222
@property

0 commit comments

Comments
 (0)