Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HOTMapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HOTMapper
HOTMapper
Commits
7da95c09
Commit
7da95c09
authored
5 years ago
by
jvfpw18
Browse files
Options
Downloads
Patches
Plain Diff
Fix CircularReferenceError being triggered by collumns of different tables
parent
88bec489
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
database/database_table.py
+3
-3
3 additions, 3 deletions
database/database_table.py
with
3 additions
and
3 deletions
database/database_table.py
+
3
−
3
View file @
7da95c09
...
@@ -787,10 +787,10 @@ class DatabaseTable(Table):
...
@@ -787,10 +787,10 @@ class DatabaseTable(Table):
# This variable has been evaluated already, just return
# This variable has been evaluated already, just return
return
self
.
_derivatives
[
target
]
return
self
.
_derivatives
[
target
]
if
target
is
not
None
and
target
in
recursion_list
:
if
target
is
not
None
and
str
(
self
)
+
'
.
'
+
target
in
recursion_list
:
# This is a circular reference. Don't be like that.
# This is a circular reference. Don't be like that.
print
(
target
)
print
(
target
)
raise
CircularReferenceError
raise
CircularReferenceError
(
target
)
original
=
self
.
_protocol
.
original_from_target
(
target
,
year
)
or
original
original
=
self
.
_protocol
.
original_from_target
(
target
,
year
)
or
original
try
:
try
:
...
@@ -826,7 +826,7 @@ class DatabaseTable(Table):
...
@@ -826,7 +826,7 @@ class DatabaseTable(Table):
str_list
=
re
.
findall
(
r
'
(
"
[\w]+
"
|[\w]+)
'
,
original
)
str_list
=
re
.
findall
(
r
'
(
"
[\w]+
"
|[\w]+)
'
,
original
)
level
=
0
level
=
0
substitutions
=
[]
substitutions
=
[]
recursion_list
.
append
(
target
)
recursion_list
.
append
(
str
(
self
)
+
'
.
'
+
target
)
for
substring
in
str_list
:
for
substring
in
str_list
:
derivative
=
self
.
_derivative_recursion
(
substring
.
strip
(
'"'
),
year
,
derivative
=
self
.
_derivative_recursion
(
substring
.
strip
(
'"'
),
year
,
recursion_list
=
recursion_list
)
recursion_list
=
recursion_list
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment