Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beat.web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
beat
beat.web
Commits
dff86cba
Commit
dff86cba
authored
7 years ago
by
jaden
Browse files
Options
Downloads
Patches
Plain Diff
plotter configs now being sent if anon user, fixes
#470
parent
c59743d7
No related branches found
No related tags found
1 merge request
!223
Reports overhaul
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beat/web/plotters/api.py
+3
-2
3 additions, 2 deletions
beat/web/plotters/api.py
with
3 additions
and
2 deletions
beat/web/plotters/api.py
+
3
−
2
View file @
dff86cba
...
@@ -91,9 +91,10 @@ class ListPlotterParameterView(ListContributionView):
...
@@ -91,9 +91,10 @@ class ListPlotterParameterView(ListContributionView):
dataformat__name
=
name
,
dataformat__name
=
name
,
dataformat__version
=
version
)
dataformat__version
=
version
)
else
:
else
:
author_name
=
'
plot
'
if
self
.
request
.
user
.
is_anonymous
()
else
self
.
request
.
user
.
username
#return self.model.objects.all()
#return self.model.objects.all()
#from author and public and get latest version only
#from author and public and get latest version only
objects
=
self
.
model
.
objects
.
from_author_and_public
(
self
.
request
.
user
,
self
.
request
.
user
.
user
name
).
order_by
(
'
-version
'
)
objects
=
self
.
model
.
objects
.
from_author_and_public
(
self
.
request
.
user
,
author_
name
).
order_by
(
'
-version
'
)
filtered_list
=
[]
filtered_list
=
[]
filtered_list_id
=
[]
filtered_list_id
=
[]
for
the_item
in
objects
:
for
the_item
in
objects
:
...
@@ -104,7 +105,7 @@ class ListPlotterParameterView(ListContributionView):
...
@@ -104,7 +105,7 @@ class ListPlotterParameterView(ListContributionView):
if
check
==
False
:
if
check
==
False
:
filtered_list
.
append
(
the_item
)
filtered_list
.
append
(
the_item
)
filtered_list_id
.
append
(
the_item
.
id
)
filtered_list_id
.
append
(
the_item
.
id
)
objects
=
self
.
model
.
objects
.
from_author_and_public
(
self
.
request
.
user
,
self
.
request
.
user
.
user
name
).
order_by
(
'
-version
'
).
filter
(
id__in
=
filtered_list_id
)
objects
=
self
.
model
.
objects
.
from_author_and_public
(
self
.
request
.
user
,
author_
name
).
order_by
(
'
-version
'
).
filter
(
id__in
=
filtered_list_id
)
return
objects
return
objects
class
ListDefaultPlotterView
(
generics
.
ListAPIView
):
class
ListDefaultPlotterView
(
generics
.
ListAPIView
):
...
...
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