Fix View getPrimaryKey, enable and disable if not have log