typo fixed

 fa = FlatPageAttachment.objects.get(pk=id(a_id)) changed to  fa = FlatPageAttachment.objects.get(pk=int(a_id)