From 0a06525b142c650fe3f22f62f5eecc04a2c5efc3 Mon Sep 17 00:00:00 2001
From: Arne Morken <arne.morken@gmail.com>
Date: Wed, 27 Nov 2024 20:56:55 +0100
Subject: [PATCH] Do not initialize id_key from table_fields[0]

---
 view/anyModel.js | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/view/anyModel.js b/view/anyModel.js
index 1cfca46..9bcc35d 100644
--- a/view/anyModel.js
+++ b/view/anyModel.js
@@ -540,10 +540,6 @@ anyModel.prototype.dataInit = function (options)
       this.error_server = options.error_server;
       this.error        = i18n.error.SERVER_ERROR;
     }
-
-    if (this.table_fields && this.id_key && !this.table_fields.includes(this.id_key))
-      this.id_key = this.table_fields[0];
-
     if (!this.error) {
       if (!this.data)
         this.data = null;