diff --git a/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html b/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html
index b30adf85d..1625aaccc 100644
--- a/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html
+++ b/app/portainer/components/datatables/stacks-datatable/stacksDatatable.html
@@ -144,18 +144,18 @@
|
diff --git a/app/portainer/models/stack.js b/app/portainer/models/stack.js
index 9b5141d1c..d2b42cf1f 100644
--- a/app/portainer/models/stack.js
+++ b/app/portainer/models/stack.js
@@ -13,9 +13,9 @@ export function StackViewModel(data) {
this.ResourceControl = new ResourceControlViewModel(data.ResourceControl);
}
this.Status = data.Status;
- this.CreationDate = data.CreationDate;
+ this.CreationDate = data.CreationDate || undefined; // set undefined for angular sorting
this.CreatedBy = data.CreatedBy;
- this.UpdateDate = data.UpdateDate;
+ this.UpdateDate = data.UpdateDate || undefined; // set undefined for angular sorting
this.UpdatedBy = data.UpdatedBy;
this.Regular = true;
this.External = false;
@@ -30,7 +30,7 @@ export function StackViewModel(data) {
export function ExternalStackViewModel(name, type, creationDate) {
this.Name = name;
this.Type = type;
- this.CreationDate = creationDate;
+ this.CreationDate = creationDate || undefined; // set undefined for angular sorting
this.Regular = false;
this.External = true;
@@ -50,9 +50,9 @@ export function OrphanedStackViewModel(data) {
this.ResourceControl = new ResourceControlViewModel(data.ResourceControl);
}
this.Status = data.Status;
- this.CreationDate = data.CreationDate;
+ this.CreationDate = data.CreationDate || undefined; // set undefined for angular sorting
this.CreatedBy = data.CreatedBy;
- this.UpdateDate = data.UpdateDate;
+ this.UpdateDate = data.UpdateDate || undefined; // set undefined for angular sorting
this.UpdatedBy = data.UpdatedBy;
this.Regular = false;
|