mlmongo 2.0.2__tar.gz → 2.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlmongo
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: mongodb数据库操作工具类
5
5
  Home-page: https://www.python.org
6
6
  Author: mengling
@@ -475,7 +475,8 @@ class MongoModel(BaseModel):
475
475
 
476
476
  def mgt_set_id(self, id_: ObjectId|None):
477
477
  self.id_ = id_
478
- for field in self.MGConfig.sync_ids: setattr(self, field, self._id)
478
+ if id_:
479
+ for field in self.MGConfig.sync_ids: setattr(self, field, self._id)
479
480
 
480
481
  def mgt_model_dump(self)->dict:
481
482
  return self.model_dump(exclude=self.MGConfig.sync_ids or None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlmongo
3
- Version: 2.0.2
3
+ Version: 2.0.3
4
4
  Summary: mongodb数据库操作工具类
5
5
  Home-page: https://www.python.org
6
6
  Author: mengling
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes