-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flask-Fixtures will parse string containing numbers as datetime #28
Comments
the parameters will be: |
I encountered the same problem, had to precede the number with letters. |
Unfortunately |
+1, same issue |
+1 Same problem. It only happens if you have @s7anley Your PR is from 2016, is it going to be merged yet? Anyway, it fixes the problem only partially. In my case I have string fields representing dates and numbers in the same json. The workaround I found is to use number in those fields, instead of string representing numbers (as they really are in the database). I'll try to come up with yet another solution for this. |
Also, if you use yaml instead of json it will work fine. |
I have a simple database, and tried to load a fixture:
[ { "model": "app.models.Devices",
"records": [ { "uuid": "1", "name": "Agent" } ]
}]
it tries to parse the uuid as a datetime object. It should not. If I change the value of uuid to "a1" then it is properly a string.
The model is:
class Devices(db.Model):
tablename = 'devices'
name = Column(String, nullable=False)
uuid = Column(String, primary_key=True, nullable=False)
The text was updated successfully, but these errors were encountered: