Return a dict for read/merge/bulk-write paths. Dict values pass through without re-parsing. Use model ``save()`` (not this) as the canonical normalizer for ORM writes that go through ``save()``.
(value)
| 99 | |
| 100 | |
| 101 | def ensure_custom_properties_dict(value): |
| 102 | """ |
| 103 | Return a dict for read/merge/bulk-write paths. Dict values pass through |
| 104 | without re-parsing. Use model ``save()`` (not this) as the canonical |
| 105 | normalizer for ORM writes that go through ``save()``. |
| 106 | """ |
| 107 | if isinstance(value, dict): |
| 108 | return value |
| 109 | if value is None: |
| 110 | return {} |
| 111 | return custom_properties_as_dict(value) |
| 112 | |
| 113 | |
| 114 | class RedisClient: |