Comments (5)
In fact, the issue is still there in the master branch.
If I define the schema like this, no error
class User(Model):
subjects = ListField()
u = User()
u.subjects = ['English', 'Math']
But with this (just like in the documentation), the error appears.
subjects = ListField(TextField())
from fireo.
Hi @trungtin,
Could you please describe how to reproduce the issue?
I just tried this on master branch and it works:
from fireo import ListUnion
from fireo.fields import ListField, TextField
from fireo.models import Model
class User(Model):
subjects = ListField()
class User2(Model):
subjects = ListField(TextField())
def test():
u = User()
u.subjects = ['English', 'Math']
u.save()
u.subjects = ListUnion(['Geography', 'History'])
u.update()
u.refresh()
assert u.subjects == ['English', 'Math', 'Geography', 'History']
def test2():
u = User2()
u.subjects = ['English', 'Math']
u.save()
u.subjects = ListUnion(['Geography', 'History'])
u.update()
u.refresh()
assert u.subjects == ['English', 'Math', 'Geography', 'History']
from fireo.
Sorry, my stupid ass thought I was running on the master branch but not.
Anyway, do we have a new version release soon?
from fireo.
This is a question for @AxeemHaider :)
from fireo.
New version 2.1.0
is available with the help of @ADR-007 :)
from fireo.
Related Issues (20)
- Bug on update model with nested model HOT 1
- How to add field during runtime? HOT 1
- FactoryBoy factories are coming soon! HOT 2
- FireO in FastAPI-filters
- Bug: QuerySet actions should not modify it's self but create a copy HOT 1
- A way to use "id" instead of "key" in Manager HOT 1
- 2.0.0 migration problem from 1.7.0 HOT 3
- Model to have a ReferenceField to itself HOT 1
- Cursor and Ordering HOT 1
- Fix delete all documents in collection documentation
- Running example script fails HOT 1
- List Field wont update / Save HOT 1
- ReferenceFields support for TypedModel HOT 2
- Default values not being set HOT 2
- FireO 2.2.1 issues with pylance and co HOT 2
- UserWarning: Detected filter using positional arguments. Prefer using the 'filter' keyword argument instead. HOT 1
- Anyway to activate function after create Model? HOT 2
- TypedModel reference fields don't work HOT 2
- Best way to get an instance id on TypedModels, without saving first
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fireo.