def _get_records()

in kinto-remote-settings/src/kinto_remote_settings/signer/updater.py [0:0]


    def _get_records(self, resource, empty_none=True):
        bid = resource["bucket"]
        cid = resource["collection"]
        parent_id = f"/buckets/{bid}/collections/{cid}"

        records = self.storage.list_all(parent_id=parent_id, resource_name="record")

        if len(records) == 0 and empty_none:
            # When the collection empty (no records and no tombstones)
            collection_timestamp = None
        else:
            collection_timestamp = self.storage.resource_timestamp(
                parent_id=parent_id, resource_name="record"
            )

        return records, collection_timestamp