Skip to content

Commit

Permalink
fixes workspace operation id bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dxenes1 committed Jan 24, 2025
1 parent 3721a9e commit 0556eb2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions neuvue_project/templates/workspace.html
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@
$(form).submit();

{% else %}
updateTrackedOperations(operation_ids)
//updateTrackedOperations(operation_ids)
viewer.postJsonState(true, undefined, true, function() {
let state = viewer.saver.savedUrl;
// Check if state successfully saved. If not use the raw JSON state
Expand Down Expand Up @@ -510,6 +510,10 @@
// Start Timer for duration tracking and auto-save
browserTimer.startTimer();


// Fix undefined operation ID
let operation_ids = [];

// Sidebar Preference
if (window.localStorage.getItem('sidebarStatus') == 'closed') {
closeSideMenu();
Expand All @@ -525,7 +529,8 @@
{% if ng_host == "spelunker" %}
updateTrackedOperations(getOperationIdsFromSpelunker());
{% else %}
updateTrackedOperations(operation_ids);
//updateTrackedOperations(operation_ids);
console.log("skipping operation_ids")
{% endif %}
}, 3000);
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions neuvue_project/workspace/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def __str__(self):
# Janky way to extend the default User model
class UserProfile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
namespace_rule = models.ManyToManyField(NamespaceRule)
namespace_rule = models.ManyToManyField(NamespaceRule, blank=True)

# @property
# def inherited_namespace_rules(self):
Expand All @@ -225,4 +225,4 @@ class UserProfile(models.Model):
# Janky way to extend the default Group model
class GroupProfile(models.Model):
group = models.OneToOneField(Group, on_delete=models.CASCADE)
namespace_rule = models.ManyToManyField(NamespaceRule)
namespace_rule = models.ManyToManyField(NamespaceRule, blank=True)
2 changes: 1 addition & 1 deletion neuvue_project/workspace/views/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def get(self, request, namespace=None, **kwargs):
push_bucket_assignee = None

# If no valid push bucket, user cannot unassign tasks
context[namespace]["allowed_to_reassign"] = bool(push_bucket_assignee)
context["allowed_to_reassign"] = bool(push_bucket_assignee)
#######################################################################################

return render(request, "workspace.html", context)
Expand Down

0 comments on commit 0556eb2

Please sign in to comment.