mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
remove getattrs on instance and context
This commit is contained in:
parent
6761aa7d68
commit
8539c03d72
2 changed files with 1 additions and 6 deletions
|
|
@ -335,14 +335,12 @@ class PublishFrame(QtWidgets.QFrame):
|
|||
if instance is None:
|
||||
new_name = (
|
||||
context.data.get("label")
|
||||
or getattr(context, "label", None)
|
||||
or context.data.get("name")
|
||||
or "Context"
|
||||
)
|
||||
else:
|
||||
new_name = (
|
||||
instance.data.get("label")
|
||||
or getattr(instance, "label", None)
|
||||
or instance.data["name"]
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -613,10 +613,7 @@ class InstanceItem(QtGui.QStandardItem):
|
|||
if role == QtCore.Qt.DisplayRole:
|
||||
label = None
|
||||
if settings.UseLabel:
|
||||
label = (
|
||||
self.instance.data.get("label")
|
||||
or getattr(self.instance, "label", None)
|
||||
)
|
||||
label = self.instance.data.get("label")
|
||||
|
||||
if not label:
|
||||
if self.is_context:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue