Obj.id printing loop of the ids, need to get only the recent/top one in Django

It's a function inside the class ServiceReportCallbackAdmin(BaseAdmin):, I'm calling save_meta from another function,

    def save_meta(self,obj, form):
        print(obj.id)

when i'm calling this function, i'm getting:

51 45 34 24 17 10 5 3 1

But i just want to get 51 only for further use, how can i do that?

Back to Top