equal
deleted
inserted
replaced
1276 def update_cb_stack(self, stack): |
1276 def update_cb_stack(self, stack): |
1277 assert len(stack) == 1 |
1277 assert len(stack) == 1 |
1278 stack[0] = self.source_execute |
1278 stack[0] = self.source_execute |
1279 |
1279 |
1280 def as_sql(self, backend, args): |
1280 def as_sql(self, backend, args): |
1281 raise NotImplementedError('source only callback') |
1281 raise NotImplementedError( |
|
1282 'This callback is only available for BytesFileSystemStorage ' |
|
1283 'managed attribute. Is FSPATH() argument BFSS managed?') |
1282 |
1284 |
1283 def source_execute(self, source, session, value): |
1285 def source_execute(self, source, session, value): |
1284 fpath = source.binary_to_str(value) |
1286 fpath = source.binary_to_str(value) |
1285 try: |
1287 try: |
1286 return Binary(fpath) |
1288 return Binary(fpath) |