Changeset - 3124a9a81f37
[Not reviewed]
0 1 0
Lance Edgar (lance) - 11 years ago 2014-01-26 16:53:24
lance@edbob.org
Remove reference to `Batch.iter_rows()`.
1 file changed with 2 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rattail/batches/providers/labels.py
Show inline comments
 
@@ -25,15 +25,14 @@
 
"""
 
Print Labels Batch
 
"""
 

	
 
from sqlalchemy.orm import object_session
 

	
 
import rattail
 
from . import BatchProvider
 
from ...db import model
 
from rattail.batches.providers import BatchProvider
 

	
 

	
 
class PrintLabels(BatchProvider):
 

	
 
    name = 'print_labels'
 
    description = "Print Labels"
 
@@ -76,13 +75,13 @@ class PrintLabels(BatchProvider):
 
            prog = progress("Loading product data", batch.rowcount)
 

	
 
        session = object_session(batch)
 
        profiles = {}
 

	
 
        cancel = False
 
        for i, row in enumerate(batch.iter_rows(), 1):
 
        for i, row in enumerate(batch.rows, 1):
 

	
 
            profile = profiles.get(row.F95)
 
            if not profile:
 
                q = session.query(model.LabelProfile)
 
                q = q.filter(model.LabelProfile.code == row.F95)
 
                profile = q.one()
0 comments (0 inline, 0 general)