Skip to content

Commit a139c20

Browse files
authored
Correctly order hasattr() parameters (#4998)
hasattr() attribute name must be string
1 parent adab64e commit a139c20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/classes/query.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ def absolute_path(self):
244244

245245
# Try to expand path relative to project folder
246246
app = get_app()
247-
if (app and hasattr("project", app)
248-
and hasattr("current_filepath", app.project)):
247+
if (app and hasattr(app, "project")
248+
and hasattr(app.project, "current_filepath")):
249249
project_folder = os.path.dirname(app.project.current_filepath)
250250
file_path = os.path.abspath(os.path.join(project_folder, file_path))
251251

0 commit comments

Comments
 (0)