Fix alarm subscription list query issue 04/9404/1
authorZhang Rong(Jon) <rong.zhang@windriver.com>
Wed, 26 Oct 2022 13:29:23 +0000 (21:29 +0800)
committerZhang Rong(Jon) <rong.zhang@windriver.com>
Wed, 26 Oct 2022 13:29:23 +0000 (21:29 +0800)
Signed-off-by: Zhang Rong(Jon) <rong.zhang@windriver.com>
Change-Id: Ic2a29db096efce1f8a929e4e3547c304d6a055cc

o2ims/adapter/alarm_repository.py

index 50f9bb2..e16c6ca 100644 (file)
@@ -95,7 +95,7 @@ class AlarmSubscriptionSqlAlchemyRepository(AlarmSubscriptionRepository):
         offset = kwargs.pop('start') if 'start' in kwargs else 0
 
         result = self.session.query(alarm_obj.AlarmSubscription).filter(
-            *args).order_by('alarmEventRecordId')
+            *args).order_by('alarmSubscriptionId')
         count = result.count()
         if size is not None and size != -1:
             return (count, result.limit(size).offset(offset))