Opened 10 years ago

Closed 10 years ago

#1010 closed defect (fixed)

Typos in mediagoblin/media_types/image/migrations.py

Reported by: ayleph Owned by:
Priority: trivial Milestone:
Component: programming Keywords: typo
Cc: Parent Tickets:

Description

Three instances of media_entries have been misspelled as media_entires. This doesn't appear to cause any problems, as the misspelled variable is referred to by the same name later, but this should still be corrected.

diff --git a/mediagoblin/media_types/image/migrations.py b/mediagoblin/media_types/image/migrations.py
index 4af8f29..83f5dc8 100644
--- a/mediagoblin/media_types/image/migrations.py
+++ b/mediagoblin/media_types/image/migrations.py
@@ -31,7 +31,7 @@ def remove_gps_from_image(db):
     metadata = MetaData(bind=db.bind)
     image_table = inspect_table(metadata, "image__mediadata")
     location_table = inspect_table(metadata, "core__locations")
-    media_entires_table = inspect_table(metadata, "core__media_entries")
+    media_entries_table = inspect_table(metadata, "core__media_entries")

     # First do the data migration
     for row in db.execute(image_table.select()):
@@ -58,9 +58,9 @@ def remove_gps_from_image(db):
         location = db.execute(location_table.insert().values(position=fields))

         # now store the new location model on Image
-        db.execute(media_entires_table.update().values(
+        db.execute(media_entries_table.update().values(
             location=location.inserted_primary_key[0]
-        ).where(media_entires_table.c.id==row.media_entry))
+        ).where(media_entries_table.c.id==row.media_entry))

     db.commit()

Change History (1)

comment:1 by Jessica Tallon, 10 years ago

Resolution: fixed
Status: newclosed

This has been fixed as of 0dc2e731, thanks!

Note: See TracTickets for help on using tickets.