Compare commits

..

2 Commits

Author SHA1 Message Date
Aiirondev_dev 88f6b77455 fix of the json upload format 2026-08-04 23:46:42 +02:00
Aiirondev_dev bc5e08142a fix of the json upload format 2026-08-04 22:24:55 +02:00
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ document.getElementById('batchUploadForm').addEventListener('submit', async func
imageMap.set(file.name.toLowerCase(), file);
});
const BATCH_SIZE = 50;
const BATCH_SIZE = 20;
try {
const csvText = await csvFile.text();
+8 -1
View File
@@ -201,6 +201,7 @@ sys.path.insert(0, "/app/Web")
from Web.modules.database import settings
from pymongo import MongoClient
import Web.modules.inventarsystem.data_protection as dp
import Web.modules.database.user as us
tenant_id = sys.argv[1].lower()
mode = sys.argv[2]
@@ -245,7 +246,7 @@ page_permissions = {
"manage_locations": True,
}
if db.users.count_documents({"Username": dp.encrypt_text("admin")}) == 0:
if db.users.count_documents({"username": dp.encrypt_text("admin")}) == 0:
db.users.insert_one({
"Username": dp.encrypt_text("admin"),
"Password": hashed_pw_string,
@@ -258,6 +259,12 @@ if db.users.count_documents({"Username": dp.encrypt_text("admin")}) == 0:
"ActionPermissions": action_permissions,
"PagePermissions": page_permissions,
})
print("User correctly added")
if db.users.count_documents({"Username": dp.encrypt_text("admin")}) == 0:
us.add_user("admin", "admin123", "admin", "admin", permission_preset='full_access')
us.make_admin("admin")
print("Fallback successfully applied")
if mode == "trial":
db.settings.update_one(