wip: Working on fixing the CError, commented out the code:

- Commented out all models except the calendar model to fix the C Error
- The error is coming from the dump method in the core_methods file
- The error happen because we call `obj.dump` so, maybe a registered
  model does not implement this method, or there is an issue in any of
  these methods, so i commented out the code to unlock one by one to
  understand the reason of the compiler error
This commit is contained in:
Mahmoud-Emad
2025-09-15 14:51:29 +03:00
parent 9a41f9e732
commit 6d67dbe2d7
14 changed files with 1528 additions and 1530 deletions

View File

@@ -20,24 +20,28 @@ pub fn get_redis_url(url string) !RedisURL {
pub fn core_get(url RedisURL) !&Redis {
mut r := new('${url.address}:${url.port}')!
if url.db>0{
if url.db > 0 {
r.selectdb(url.db)!
}
return r
}
//give a test db, if db is 0, we will set it on 31
// give a test db, if db is 0, we will set it on 31
pub fn test_get(url_ RedisURL) !&Redis {
mut url:=url_
if url.db==0{
url.db=31
mut url := url_
if url.db == 0 {
url = RedisURL{
address: url_.address
port: url_.port
db: 31
}
}
return core_get(url)!
}
//delete the test db
// delete the test db
pub fn test_delete(url_ RedisURL) !&Redis {
mut r:= test_get(url)!
r.flush()!
}
mut r := test_get(url_)!
r.flushdb()!
return r
}