Skip to content
Browse files

Merge pull request #32 from wmatyskiewicz/search

Search
  • Loading branch information...
2 parents 1b7da22 + 93b4cdf commit 5224ccb9031ab2291e1e31bd3507e0700d8edc4c @deshipu deshipu committed Jul 16, 2013
View
3 src/ralph_assets/models_assets.py
@@ -273,7 +273,8 @@ def get_data_icon(self):
raise UserWarning('Unknown asset data type!')
def create_stock_device(self):
- if self.type is not AssetType.data_center.id:
+ if self.type != AssetType.data_center.id:
+
return
try:
if self.sn:
View
2 src/ralph_assets/tests/functional/tests_crud.py
@@ -88,7 +88,7 @@ def test_send_data_via_add_form(self):
if field == 'size':
output = row_from_table.device_info.size
elif field == 'ralph_device_id':
- output = '' # test Hock
+ output = '' # test Hook
else:
output = getattr(row_from_table, field)
msg = 'Field: %s Input: %s Output: %s' % (field, input, output)
View
8 src/ralph_assets/views.py
@@ -195,7 +195,12 @@ class AssetSearch(AssetsMixin, DataTableMixin):
_('Support void_reporting', field='support_void_reporting',
export=True),
_('Niw', field='niw', foreign_field_name='', export=True),
- _('Niw', field='device_info', foreign_field_name='ralph_device_id', export=True),
+ _(
+ 'Ralph ID',
+ field='device_info',
+ foreign_field_name='ralph_device_id',
+ export=True
+ ),
_('Type', field='type', export=True),
_(
'Deprecation rate',
@@ -219,6 +224,7 @@ def handle_search_data(self):
'deleted',
'manufacturer',
'barcode',
+ 'device_info',
]
# handle simple 'equals' search fields at once.
all_q = Q()

0 comments on commit 5224ccb

Please sign in to comment.
Something went wrong with that request. Please try again.