Modify

Ticket #228 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Problems with fakeORM and script migration

Reported by: valdergallo@… Owned by: andrew
Priority: major Milestone: 0.7
Component: commands Version: 0.6.1
Keywords: fakeORM Cc:

Description

Traceback (most recent call last):

File "/usr/lib/python2.5/site-packages/South-0.6-py2.5.egg/south/migration.py", line 326, in run_migrations

runfunc(orm)

File "/home/ig/git/vflowtv/../vflowtv/statistics/migrations/0007_domain_migrations.py", line 47, in forwards

visitorlog.save()

File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 408, in save

self.save_base(force_insert=force_insert, force_update=force_update)

File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 463, in save_base

rows = manager.filter(pk=pk_val)._update(values)

File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 411, in _update

query.add_update_fields(values)

File "/usr/lib/python2.5/site-packages/django/db/models/sql/subqueries.py", line 245, in add_update_fields

val = field.get_db_prep_save(val)

File "/usr/lib/python2.5/site-packages/django/db/models/fields/related.py", line 687, in get_db_prep_save

return self.rel.get_related_field().get_db_prep_save(value)

File "/usr/lib/python2.5/site-packages/django/db/models/fields/related.py", line 622, in get_related_field

data = self.to._meta.get_field_by_name(self.field_name)

AttributeError?: 'str' object has no attribute '_meta'

Attachments

migrationDomain_0007.py (4.2 KB) - added by valdergallo@… 5 years ago.
Migration's script using fakeORM
models.2.py (2.0 KB) - added by valdergallo@… 5 years ago.
Model with changes

Change History

Changed 5 years ago by valdergallo@…

Migration's script using fakeORM

comment:1 Changed 5 years ago by andrew

  • Status changed from new to assigned
  • Milestone changed from 0.6 to 0.6.1

I'll look into this, we've had similar issues before. Would it be possible to attach the models.py file?

Changed 5 years ago by valdergallo@…

Model with changes

comment:2 Changed 5 years ago by andrew

  • Version changed from 0.6 to 0.6.1
  • Milestone changed from 0.6.1 to 0.6.2

I can't seem to trace this down yet; bumping to the next 0.6 release.

comment:3 Changed 4 years ago by andrew

  • Milestone changed from 0.6.2 to 0.6.3

comment:4 Changed 4 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Milestone changed from 0.6.3 to 0.7

This is now fixed in 0.7.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.