Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-4572

Copy to clipboard button in export to language ignores import for Python

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.31.0
    • Affects Version/s: None
    • Component/s: Compass
    • Labels:
      None
    • 3
    • Not Needed
    • Iteration Versailles

      Problem Description

      When copying Node and Python Code generated in Compass for an aggregation pipeline, and including the driver and library references, it is leaving out those references when copying to the clipboard

      Steps to Reproduce

      Create an aggregation, export to python, check the box for "Include Import Statements" and for "Include Driver Syntax", observe that from pymongo import MongoClient is added at the beginning of the file.

      Click the button and paste into a text editor.

      Expected Results

      In the text editor I see from pymongo import MongoClient at the beginning of the file.

      Actual Results

      I don't see from pymongo import MongoClient.

      Additional Notes

      Reported on Slack.

            Assignee:
            leroux.bodenstein@mongodb.com Le Roux Bodenstein
            Reporter:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: